Nov 21, 2012

0 IIS + Apache

How to unbind IIS from all IPs and include only the ones you need: LINK

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

  • stop all IIS services: net stop http /y
  • have IIS listen only on the IP address I’d designated for IIS:
  • httpcfg set iplisten -i
  • make sure: httpcfg query iplisten (the ip listed are only ip addresses IIS will be listening)
  • restart IIS Services: net start w3svc
  • start Apache service

To add an IP address to the IP inclusion list
1.    Click Start, and then click Run.
2.    Type cmd, and then click OK to open a command prompt.
3.    Type the following, where is the IP address you want to add:
httpcfg set iplisten -i
When this succeeds, Httpcfg returns the following:
HttpSetServiceConfiguration completed with 0

To view additional status codes, see the Httpcfg help.
4.    After the IP address is added, use the following command to list it:
httpcfg query iplisten
Httpcfg returns the following:
5.    From the command prompt, stop the HTTP service and its dependent services. To do this, type the following string at the command prompt:
net stop http /y
6.    From the command prompt, restart the HTTP service and it dependent services. To do this, type the following string at the command prompt:
net start w3svc
Note When you start w3svc, all services that were stopped when HTTP was stopped will start.

Way Nr.2

For people who have NIC 
Add to your IP adresses section 
Simply add your hosts file these lines 
(c:\windows\system32\drivers\etc\hosts) iishost [] apachehost []

Change your IIS config web site: 

/ ip adresses / advanced web site identification 
IP Address: 
TCP Port: 80 
Host Header Name: iishost []
Add/modify these lines at your Apache config file by default 
(C:\Program Files\Apache Group\Apache\conf\httpd.conf) 

Listen ServerName apachehost []

NameVirtualHost apachehost []


ServerAdmin webmaster@apachehost 
DocumentRoot "C:/whereisyourrootdirectory/" 
ServerName apachehost [] 
ErrorLog logs/dummy-error 
CustomLog logs/ common 

Update : Nicely written article about the same problem : LINK