Error: Unable to Bind to the 80 port number

Dec 25, 2012   //   by contactng   //   Blogging Tips  //  4 Comments

While installing BITNAMI WordPress multisite stack, I faced following error,

“Unable to bind to the 80 port number. WordPress Multisite only supports this port for the apache server.”

After which installation stuck as multisite can only be installed on port 80.

Troubleshooting Tips: Now troubleshooting these errors are bit complex as this error might be due to several reasons, I will touch important aspects of those, how you can start troubleshooting and identify the culprit,

1. Open CMD prompt and run netstat –aon

Result will look like below; see here in my case, TCP 80 port (local address 0.0.0.0:80) is in state listening by PID (Process ID) 4

2. Now we should identify what PID 4 is, so for same, open task manager, go to View > Select columns > Select PID and click ok,

 

Now it will show the details as,

 

Hence a system process was using this port.

3. Now this is preliminary stage of investigation, now there can be several reasons of someone using port 80,

a) If Skype is present on your system, then go to Skype’s preferences and disable Skype WIFI in the advanced tab

b) Check your antivirus settings, sometime port scanning is enabled (explained at – http://www.geniisoft.com/showcase.nsf/archive/20090525-0942 )

c) Check IIS, sometimes IIS also binds port 80 and doesn’t allow any other webserver to use it (if you planning to use Apache then prefer disabling IIS or plan to use two IP address and configure each server to use different IP address)

d) If you have installed Microsoft WebMatrix tools then also it binds to port 80, check for service with name “Web Deployment Agent Service” and stop/disable it and try to run the BITNAMI stack again, in my case it worked!

e) If above also didn’t solve your issue then follow below instructions,

Inst 1: try stopping “SQL Server Reporting Services (MSSQLSERVER)”, that apparently defaults to 80. I did that and port 80 freed up. PID identified the culprit as “System”, but apparently that System can mean multiple things

Inst 2: Try stopping IIS by going into Control Panel/Administrative Tools/Internet Information Services, right-clicking on Default Web Site, and click on the Stop option in the popup menu, and see if the listener on port 80 has cleared.

Inst 3: Try to fix it by stopping the World Wide Web Publishing Service under running services.

Inst 4: As suggested at following link, have two separate IP addresses so that both could listen on port 80: http://www.prismix.com/blog/2006/06/running_apache_and_iis_6_toget.cfm

There was a caveat that you had to make a change in IIS because of socket pooling. Here are the instructions based on the link above:

1.Extract the httpcfg.exe utility from the support tools area on the Win2003 CD.

2.stop all IIS services: net stop http /y

3.have IIS listen only on the IP address I’d designated for IIS: httpcfg set iplisten -i 192.168.1.253

4.make sure: httpcfg query iplisten (the ip’s listed are the only ip addresses that IIS will be listening on and no other)

5.restart IIS Services: net start w3svc

6.start Apache service

Inst 5: For people with only one IP address and multiple sites on one server, you can configure IIS to listen on a port other than 80, e.g 8080 by setting the TCP port in the properties of each of its sites (including the default one).

In Apache, enable mod_proxy and mod_proxy_http, then add a catch-all VirtualHost (after all others) so that requests Apache isn’t explicitly handling get “forwarded” on to IIS.

<VirtualHost *:80>

ServerName foo.bar

ServerAlias *

ProxyPreserveHost On

ProxyPass / http://127.0.0.1:8080/

</VirtualHost>

Now you can have Apache serve some sites and IIS serve others, with no visible difference to the user.

 

Now if above all will not solve your issue then go through below references, you may find hint to your issue.

Useful References:

http://social.msdn.microsoft.com/Forums/is/netfxnetcom/thread/eca9968e-bfe9-4c7e-861c-768456b07b60

https://discussion.dreamhost.com/thread-131430.html

http://stackoverflow.com/questions/108387/apache-and-iis-side-by-side-both-listening-to-port-80-on-windows2003

http://stackoverflow.com/questions/1430141/port-80-is-being-used-by-system-pid-4-what-is-that

http://ubuntuforums.org/archive/index.php/t-1737254.html

http://www.mirthcorp.com/community/forums/showthread.php?t=2508

4 Comments

Leave a comment to BITNAMI Multisite wordpress stack installation issues and fixes « …are you lost in this creative world? welcome…

Subscribe to LostinCreativity.com

Enter your email address to subscribe to this website and receive notifications of new posts by email.

Join 110 other subscribers