Home > database >  I have a problem when start apache on windows
I have a problem when start apache on windows

Time:06-23

When I click start I get this error

2:30:55 PM  [Apache]    Problem detected!
2:30:55 PM  [Apache]    Port 80 in use by "Unable to open process" with PID 4!
2:30:55 PM  [Apache]    Apache WILL NOT start without the configured ports free!
2:30:55 PM  [Apache]    You need to uninstall/disable/reconfigure the blocking application
2:30:55 PM  [Apache]    or reconfigure Apache and the Control Panel to listen on a different port

CodePudding user response:

open cmd in administrator mode and type this line

netstat -aon | findstr "80"

you will find pid of apps that use this port take that pid suppose we find pid 4 then type this line in cmd

tasklist /fi "pid eq 4"

you will get application name you can unistall this app or close you can type in cmd

taskkill /PID 4 /F

also mostly 'Workstation' Services make trouble for port

you can stop through Services.msc and stopp 'Workstation' Services

CodePudding user response:

Your port 80 is probably busy. What you can do is closing the service running on this port as Akram answered or, if you have to keep the port 80 free for something like node.js for exemple in my case or any other program, you can change the listening port in the Apache config files.

Go to XAMPP panel > Apache config button > httpd.conf

Then search for Listen 80 and edit it to Listen 8080 or Listen 8008.

/!\ Don't assign any other port than HTTP provided ones, you could have conflict between your services /!\

Remember that you'll have to change the address in the browser to access the server, for exemple http://localhost:8080 if you switched port to 8080.

  • Related