Home › Resources › Articles

How to Run IIS and Apache on the Same Machine

(Microsoft IIS,Web Programming,Apache HTTP Server) by Jason Skowronek on 03/02/2010

I have decided to consolidate various how-to's on configuring Apache and IIS to run on the same machine but on different IP addresses.

This how-to assumes you have IIS and Apache installed and configured to do everything, but cannot get them to run simultaneously.

Bind IIS to Specific IP Addresses

  1. Make sure your machine has two IP addresses
  2. For IIS 7
    1. Stop IIS services
    2. Open a command prompt
    3. Type netsh
    4. Type http
    5. Type sho iplisten. (It should be blank)
    6. Type add iplisten ipaddress=XXX.XXX.XXX.XXX (IP address to bind IIS to)
      You should get IP address successfully added message
    7. Type add iplisten ipaddress=127.0.0.0 (this allows for localhost browsing)
      You should get IP address successfully added message
    8. Type sho iplisten
      It should show XXX.XXX.XXX.XXX and 127.0.0.0 in the list
    9. Type exit to get out of netsh
    10. Start IIS services
    11. Type netstat -an. Only XXX.XXX.XXX.XXX:80 and 127.0.0.0:80 should be bound to port :80.
  3. For IIS 6
    1. Follow the Microsoft KB Article

Bind Apache to Specific IP Address

  1. Open httpd.conf
  2. Set IP bindings to listen to the alternate IP and port
    1. Listen XXX.XXX.XXX.YYY:80
  3. Restart the Apache service (httpd -k stop, httpd -k start)

Verify Bindings

  1. Open command prompt
  2. Type netstat -an
  3. You should see XXX.XXX.XXX.XXX:80, 127.0.0.0:80, and XXX.XXX.XXX.YYY:80
  4. Open a browser and test both IP's to see if IIS and Apache come up

Thanks to:

Comments (0)

Leave a comment
Name *
Email *
Homepage
Comment

SkoNet provides comprehensive digital consulting services such as: web development, applications development, database design and architecture, business process management, customer relationship management, and many others that help businesses of every size, industry, and geography meet the complex challenge of managing and sharing information on the web. Our skills and expertise in online systems allow us to help customers build applications ranging from simple, single-page web sites to robust enterprise systems.

Online Backup, Ektron Consulting, Ektron Programmer, Ektron Developer, Ektron Partner in Utah, Ektron Partner, Ektron Architect, Ektron Hosting, Salesforce.com Consultant in Utah, Salesforce.com Partner in Utah, Salesforce.com Partner, Salesforce.com Programmer, Salesforce.com Architect, Salesforce.com APEX Programmer