2012-09-20

How to run IIS and Apache on the same server

IIS binds all IPs on the server using http.sys.

Sample configuration
IIS on 192.168.0.10:80
Apache on 192.168.0.20:80
  1. For IIS
    • Run netsh on Windows 2008 server,
    • C:\>netsh
      netsh> http add iplisten ipaddress=192.168.0.10
      
      IP address successfully added
      
      netsh> http show iplisten
      
      IP addresses present in the IP listen list:
      -------------------------------------------
      192.168.0.10
      
      netsh> exit
      
    • Download and Run httpcfg on Windows 2003 server,
    • http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=15326
      C:\> httpcfg.exe set iplisten -i 192.168.0.10
      C:\> net stop http
      C:\> net start http
      

  2. For Apache Modify httpd.conf
  3. Listen 192.168.0.20:80
    
  4. Result
    • You can see the Welcome screen by IIS with http://192.168.0.10/
    • Also, you have the response from Apache with http://192.168.0.20/

No comments:

Post a Comment