Apache & IIS Multiple Address on Port 80
Whilst developing with Apache, and IIS over a number of years, I have always found it frustrating to have to type and use a seperate port for the different web servers as you cannot bind to an IP Address with a single port, such as port 80. If you have tried to add multiple IPs, and bind to them, you may hav noticed this fail. This is due to a very simple configuration in IIS.
To Add multiple IP address’s, right click on your network adapter and click properties.
Enter the DNS information from your ISP, the default gateway, subnet, and your IP address.
Open the command line, and run the following.
CSCRIPT ADSUTIL.VBS SET W3SVC/DisableSocketPooling TRUE
This disables IIS from listening to the default IP address and run .
Select the Default Web Site, and right click opening properties.
Set the IP Address to an IP that is free and does not already have a server listening on port 80. Clicking Advanced you can bind IIS to a number of IPs or Host headers (Domains [www.ajohnstone.com], leaving the host header blank sets it as the default address).>
Now open httpd.conf
Modify the line.
“Listen 80″ to “Listen 192.168.0.100:80″ with the IP address you wish to bind it to.
Also update the “NameVirtualHost *:80″ in the same fashion to “NameVirtualHost 192.168.0.100:80″
Now open the hosts file. (C:\WINDOWS\system32\drivers\etc\hosts)
127.0.0.1 localhost 192.168.0.99 IIS 192.168.0.100 Apache
now restart apache and your set.