Before on Windows 2003 server, this same configuration has been done successfully. Now on Windows 2008 Web edition tried today it worked too.
First need to download the Support Tools from Microsoft site. Of course it is Windows Server 2003 Service Pack 1 32-bit Support Tools, but we need “httpcfg” command mainly to do this exercise.
In order to configure IIS7 and Apache on same machine for port 80, need 2 or more IP addresses configured to your machines’ network card. So that we can use one for Apache and the other to IIS.
In windows 2008 to add more IP is to LAN card, open Control Panel → Network and Sharing Center → Manage network connections
On your ‘Local Area Connection’ right click and open properties. Double click on IP V4 option to open it properties. From ‘Advance’ dialog you can add more IPs to the machine.
To run the support tools commands, better to be in safer side, open the command prompt with administrator privileges.
Change your path to the support tools installed directory, normally
C:\Program Files\Support Tools>
Next execute these commands one after the other to set the IP
httpcfg set iplisten -i xxx.xxx.xxx.xxx
to confirm
httpcfg query iplisten
this will list the IPs that are binded to IIS.
then stop all HTTP services and restart
net stop http /y net start w3svc
This will stop
Windows Remote Management (WS-Management)
World Wide Web Publishing Service
Print Spooler
IIS Admin Service
But it may start only ‘World Wide Web Publishing Service’, so restart your machine once the above setup is done, that will start other dependent services.
In some cases, like DotNetPanel control panel it looks for local loop back URL 127.0.0.1. So need to add the same and restart the HTTP service again.
httpcfg set iplisten -i 127.0.0.1
In Apache’s httpd.conf you can make it listen to 80 port and add IP to your web site
<VirtualHost XXX.XXX.XXX.XXX:80>
DocumentRoot C:/my.website.path/
ServerName example.com
ServerAlias *.example.com
</VirtualHost>
If you have any queries and like to discuss please post your comments below.