简体   繁体   中英

Xampp's APACHE not working?

I have installed/reinstalled Xampp server on my laptop for a million times now, and still Apache is not running. At first, it will Run, but few moments later it will automatically stop. I don't know what seems to be the conflict. I have checked my Skype since I once met a conflict on the port usage but in this case, I haven't installed Skype. Can someone please guide me on how to make my Apache run successfully. Note that my mySql runs smoothly, only Apache won't. Please help..:(

PS

When I run my xampp-control panel, mySql runs smoothly whereas Apache will run for a moment and then will stop, below in the control panel, it will then say apache[port 80] is busy.

What caused this problem on my system (Windows 7) was that the WinHTTP Web Proxy Auto-Discovery Service had stopped running. In the Services part of the Computer Management feature (ie the app that runs by selecting Manage from the right-click menu on the Computer link on the Start Menu), I found that WinHTTP Discovery Service was set to 'Manual'. I left it as 'Manual', but started it, and Apache began working again.

Even though I didn't change the 'Manual' nature of the service's startup, I discovered that, after Windows reboot, the WinHTTP service was still running (which was a bit puzzling to me, but there we are). I also don't know what caused this service to stop running on my machine ('but there we are' again!)

Anyway, it seems that having WinHTTP Web Proxy Auto-Discovery Service running is necessary for Apache to run, so make sure it's running!

EDIT TO ADD: I found the root cause of my problem: I'd downloaded a free game that uses Pando (peer-to-peer file sharing app) to allow others to download the game from my machine too (which, in principle, I was okay with), and it uses TCP port 443, which was stopping Apache running. I assume (though really don't know enough about networking to be sure) that the running of the WinHTTP Web Proxy Auto-Discovery Service mentioned above was managing to share (or otherwise work around) the use of port 443.

Open a cmd as Administrator (Start -> "cmd" -> right-click "cmd.exe" -> Run as Administrator)

Type

netstat -nab

Find the line that says

TCP    0.0.0.0:80

well or basically every line that ends with :80

See the exe that's blocking the port above the line. Terminate the associated program - if nothing else works the Task-Manager should help.

EDIT: Usually IIS would block Port 80 if it is started. There are quite a lot of other programs that could block port 80 though. You can also try and

telnet localhost 80

and see what kind of service answers. Or... use a webbrowser. Or... configure apache to use a different port (but who wants to do that?)

Reconfigure Apache to run on a different port

You might want to pick this path if you don't want to close the application blocking port 80. A typical reason might be that you want to run say, Apache and IIS on the same machine at the same time.

To configure Apache to run on a different port, goto this path "C:\\xampp\\apache\\conf" (if you install Xampp on diffrent place then navigate to this path) and open httpd.conf in notepad. Search for the following lines:

1号线 Line 1 : Listen 80

2号线 Line 2 : ServerName localhost:80

Change both these lines, so as to have a different number instead of 80. I have chosen 8000 instead of 80. Make sure that this is a free port, not used by any applications.

Line 1 : Listen 8000
Line 2 : ServerName localhost:8000

Save the file and run Apache from Xampp

Try disabling your Anti-Virus software temporarily. It's known to cause Apache problems. Also check Apache error.log file to see if it has recorded any issues.

Also try some other WAMPs to see if it's a common problem on your system.

Skype automatically blocks the port 80

Stop Skype - Try the apache to start from xampp dashboard

If apache Works - change skype settings

1) In the system tray, we click on the xampp icon. 2) Select Apache> httpd.conf 3) Make a call to Listen 80. 4) Change the number 80 next to Listen to 9080. 5) Restart XAMPP's services

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM