This problem occurred when I downloaded something.
This shows: httpd.conf and httpd-ssl.conf file.
The other options that I seen for config are httpd-xampp.conf, php.ini and config.inc.php (I didn’t include these in this comment. I changed the ports, I think something is using port 80 but I don’t know how to check.
Apache PID(s) that were shown are: 21080, 1440
Apache port(s): 4433, 8080
16:26:02 [Apache] Problem detected!
16:26:02 [Apache] Port 80 in use by "Unable to open process" with PID 4!
16:26:02 [Apache] Apache WILL NOT start without the configured ports free!
16:26:02 [Apache] You need to uninstall/disable/reconfigure the blocking application
16:26:02 [Apache] or reconfigure Apache and the Control Panel to listen on a different port
16:26:02 [Apache] Attempting to start Apache app...
16:26:02 [Apache] Status change detected: running
The changes I made to httpd.conf:
Listen 12.34.56.78:8080
Listen 8080
ServerName localhost:8080`
The changes I made to httpd.conf httpd-ssl.conf:
Listen 4433
<VirtualHost _default_:4433>
I just want Apache to work I am stressed out because it’s not starting up even after I changed the ports, I think something is using port 80 but I don’t know how to check.
2
Answers
If you’re on Windows, you can check which ports are in use by using the
netstat
command, shown below. (More info)Open Command Prompt in administrator mode by searching for it in the Windows search bar and clicking ‘Run as Administrator’. Then run the following command
If you’re on Linux, you can use the
lsof
command, shown below. (More info).Open the linux terminal (assuming you have a GUI loaded, if not just type in the command directly) and type in the following command:
That’s how you find out which processes are using which ports, if that is the issue you’re facing
If you enlarge your Xampp Control Panel window, you will see on the extreme right of that window a button called "Netstat". It will give you the same information as DOS command netstat, but in a "beginners-readable" format. There, you must inspect the second column (port) for the number 80. After finding it, go to the fourth column (Name) and you will see the application that is using this port. Copy its name and then search the internet to find out who is it.
Example: if you find that the executable Skype.exe is using port 80, searching the Internet you will discover that it refers to the application "Microsoft Skype".