简体   繁体   中英

Port 80 unable to open process

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

How can I solve the above problem?

If you are using unix machine, in terminal:

$> lsof -i tcp:80

will show you something like:

some_app    some_pid admin   17u  IPv4 272781237      0t0  TCP

(some_pid is process id, a number)

so you can now kill the app using port 80 using

$> kill some_pid

or

$> kill -9 some_pid

and make sure you turn off skype, it sometimes uses port 80

Check your windows task manager for the program/service that has PID 4. If there isn't one then open up services.msc . You can get there by typing it in on the start menu.

在此处输入图像描述

Scroll to the bottom and look for World Wide Publishing Web , right click and disable it.

Skype also uses port 80, so if you have it open, close it. Or you can configure Skype to not use port 80.

Whenever I get this error in XAMPP checking these things always fix the issue.

SOLUTION:

On your XAMPP Control Panel, Stop Apache Module, click on Config button, then select Apache (httpd.conf). Find (Ctrl+F) 80 on the file. Replace all 80s with a random value you like (8080 looks good) and save the file. Now click on Config button, then select Apache (httpd-ssl.conf). Find (Ctrl+F) 443 on the file. Replace all 443s with a random value you like (4433 looks good) and save the file. Start the Apache Module again. Now APACHE must work fine:)

NOTE:

If you would like to know the exact reason for this error, open your Task Manager and go to Details tab. Find the process with the PID mentioned on the XAMPP error log. Here what exactly has happened is your port is busy with another process which is indicated by the PID (Process ID). So in the solution, what we did is, allocating another port for APACHE.

ADDITIONAL TIP:

When you type localhost on your browser's address bar, it uses the port 80 by default. But since you make changes to the default ports of Apache Module, make sure you adjust your localhost's address accordingly. For an example, if you change your port 80 to port 8080, you will have to use http://localhost:8080/ all the time on the browser, so that your browser will know Apache is now using port 8080, not the default port.

If you get stuck or would like to learn about the topic, you can find the detailed explanation from my blog article: http://ashenlive.blogspot.com/2016/08/web-programming-with-php.html

u can try press config(wrench button) -> service and port setting, there u can try another port such as 8080 or 8083

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