可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
I am using XAMPPS to host PHP files from my machine. I have recently installed XAMPPs but I am unable to start Apache service as port 80 is in use by PID 4 - NT Kernel & System.
I know by using a different port (such as port 8080 etc change in httpd.conf) will get to a workaround for this issue. However I need port 80 to be released by PID 4 process and allocated to Apache service. I have done that in the past but have forgotten the resolution steps over the time. Please help me fix it
This is the error I am encountering while starting Apache
`11:19:52 AM [Apache] Error: Apache shutdown unexpectedly.`
`11:19:52 AM [Apache] This may be due to a blocked port, missing dependencies,`
`11:19:52 AM [Apache] improper privileges, a crash, or a shutdown by another method.`
`11:19:52 AM [Apache] Press the Logs button to view error logs and check`
`11:19:52 AM [Apache] the Windows Event Viewer for more clues`
`11:19:52 AM [Apache] If you need more help, copy and post this`
`11:19:52 AM [Apache] entire log window on the forums`
Logs from apache error log file:
[Wed Jul 03 00:54:17.004882 2013] [mpm_winnt:notice] [pid 248:tid 240] AH00354: Child: Starting 150 worker threads.
[Wed Jul 03 01:17:37.485351 2013] [mpm_winnt:notice] [pid 4200:tid 228] AH00428: Parent: child process 248 exited with status 1073807364 -- Restarting.
[Wed Jul 03 08:51:45.875976 2013] [ssl:warn] [pid 400:tid 228] AH01909: RSA certificate configured for www.example.com:443 does NOT include an ID which matches the server name
[Wed Jul 03 08:51:46.188476 2013] [core:warn] [pid 400:tid 228] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Wed Jul 03 08:51:46.844726 2013] [ssl:warn] [pid 400:tid 228] AH01909: RSA certificate configured for www.example.com:443 does NOT include an ID which matches the server name
[Wed Jul 03 08:51:49.047851 2013] [mpm_winnt:notice] [pid 400:tid 228] AH00455: Apache/2.4.4 (Win32) OpenSSL/0.9.8y PHP/5.4.16 configured -- resuming normal operations
[Wed Jul 03 08:51:49.047851 2013] [mpm_winnt:notice] [pid 400:tid 228] AH00456: Server built: Feb 23 2013 13:07:34
[Wed Jul 03 08:51:49.047851 2013] [core:notice] [pid 400:tid 228] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache
[Wed Jul 03 08:51:49.063476 2013] [mpm_winnt:notice] [pid 400:tid 228] AH00418: Parent: Created child process 5384
[Wed Jul 03 08:51:50.579101 2013] [ssl:warn] [pid 5384:tid 240] AH01909: RSA certificate configured for www.example.com:443 does NOT include an ID which matches the server name
[Wed Jul 03 08:51:51.579101 2013] [ssl:warn] [pid 5384:tid 240] AH01909: RSA certificate configured for www.example.com:443 does NOT include an ID which matches the server name
[Wed Jul 03 08:51:51.750976 2013] [mpm_winnt:notice] [pid 5384:tid 240] AH00354: Child: Starting 150 worker threads.
NOTE: I DO NOT HAVE IIS, WEB CLIENT, WORLD WIDE WEB SERVICE.
回答1:
on your XAMPP control panel, next to apache, select the "Config" option and select the first file (httpd.conf):
there, look for the "listen" line (you may use the find tool in the notepad) and there must be a line stating "Listen 80". Note: there are other lines with "listen" on them but they should be commented (start with a #), the one you need to change is the one saying exactly "listen 80". Now change it to "Listen 1337".
Start apache now.
If the error subsists, it's because there's another port that's already in use. So, select the config option again (next to apache in your xampp control panel) and select the second option this time (httpd-ssl.conf):
there, look for the line "Listen 443" and change it to "Listen 7331".
Start apache, it should be working now.
回答2:
If you are using the latest Skype, go to:
Tools -> Options -> Advanced -> connection.
Disable the 'Use port 80 and 443 for alternatve.. '
Sign Out and Close all Skype windows. Try restart your Apache again.
回答3:
Follow these:
- open your xampp control panel then click its "config"
choose the "Apache (httpd.conf)" and find this code below and change it into this one:
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 0.0.0.0:80
#Listen [::]:80
Listen 80
#
# Dynamic Shared Object (DSO) Support
save it (ctrl + s)
after that, go back to xampp control panel and click again its config
choose "Apache (httpd-ssl.conf)" find this code below and change it again:
# Note: Configurations that use IPv6 but not IPv4-mapped addresses need two
# Listen directives: "Listen [::]:443" and "Listen 0.0.0.0:443"
#
#Listen 0.0.0.0:443
#Listen [::]:443
Listen 443
save it (ctrl + s)
then, click the "config" (note: above the netstat) and click the "service and port settings" then save both of it.
finally, go to the "control panel" -> "Programs & Features" -> "Turn Windows On or Off".
Uncheck your "Internet Information Services" then click ok.
Just wait for it and your computer/laptop will be automatically restart and try to open again your xampp control panel then start your Apache.
回答4:
It means port 80 is already used by another one.
Simply follow these steps:
- Open windows -> click on Run (win + R) -> type services.msc
- Goto IIS Admin -> Right click on it and click on Stop Option.
- Open XAMPP click on Start Action of Apache Module, Apache Module is run.
OR
For find the port of Apache (80) in Command Prompt simply type netstat -aon it displays present used ports on windows, under Local Address column it shown as 0.0.0.0:80. If it displays this port another connection is already used this port number.
Active Connections in Windows XP:
I solved my problem after installing xampp-win32-1.6.5-installer previously I used xampp version xampp-win32-1.8.2-0-VC9-installer at that time I got this error. Now it resolved my problem.
回答5:
You shuld run file setup_xampp.bat in XAMP folder first!
回答6:
On your XAMPP control panel, next to apache, select the "Config" option and select the first file (httpd.conf):
there, look for the "listen" line (you may use the find tool in the notepad) and there must be a line stating "Listen 80". Note: there are other lines with "listen" on them but they should be commented (start with a #), the one you need to change is the one saying exactly "listen 80". Now change it to "Listen 1337".
Start apache now.
If the error subsists, it's because there's another port that's already in use. So, select the config option again (next to apache in your xampp control panel) and select the second option this time (httpd-ssl.conf):
there, look for the line "Listen 443" and change it to "Listen 7331".
Start apache, it should be working now.
回答7:
I had a similar issue (that is the reason I come to this thread) that originated from a typo in httpd-vhosts.conf
instead of <VirtualHost domain-name:80
> I accidentally wrote (through copy-paste) as <domain-name *:80
>
回答8:
In my situation I had moved the htdocs to a new location updated in httpd.conf, which worked fine. I then received the same error after updating the httpd-vhost.conf file.
I found that the error was caused by a typo in the vhost configuration file. Previously I changed all "DocumentRoot" ’s to the new htdocs location, but had forgot to update the new location for "ErrorLog". After correcting the missing path, Apache was running smooth again.
回答9:
This problem may occur because of skype installation in the system. Skype and apache service always conflict. Make sure your skype is not started before starting xampp.
回答10:
Your XAMPP restarting with following error at Multi-Processing Module
mpm
[mpm_winnt:notice] [pid 4200:tid 228] AH00428:
`Parent: child process 248 exited with status 1073807364 -- Restarting.`
Add the following in the httpd.conf file of xampp to resolve this.
<IfModule mpm_winnt_module>
ThreadStackSize 8388608
</IfModule>
回答11:
i think the error is here
[pid 5384:tid 240] AH01909: RSA certificate configured for www.example.com:443 does NOT include an ID which matches the server name
or there is another app are using the port 80
try restarting your computer and only opening apache and see what happens
or
try on reinstalling apache or using Ampps
回答12:
That is because IIS is automatically running on your machine. IIS occupied both port 80 and 443.
I uninstalled IIS for using Apache httpd.
回答13:
You can disable port 80 and 443 as alternative incoming connections in Skype settings - Advanced settings - Connection.
(source: ctrlv.in)
回答14:
Stop the IIS service. It should work then
回答15:
Just change the port 80 to anything else like 8080(in httpd.conf), and port 443 to something else like 4433 (in httpd-ssl.conf)
回答16:
I shut down the computer and restarted after installing the software and that fixed my problem.
回答17:
I have also faced the same issue while installing the XAMPP. The reason being the port 80 as configured in httpd.conf is already in use in other application (eg., in Skype). You can change the port value in httpd.conf to 8080 or other number. Click on config icon and open http.conf file. Search for 80 and do the following steps
In httpd.conf change
Listen 80 to Listen 8080
and
ServerName localhost:80 to
ServerName localhost:8080
You can check the ports used currently by clicking on netstatt icon in the XAMPP Control Panel