[Last Call] Learn how to a build a cloud-first strategyRegister Now


IIS and Apache at the same time

Posted on 2004-11-30
Medium Priority
Last Modified: 2008-12-09
I want to run apache and IIS at the same time for testing. How would I do this? Is there a way to have somethin like localhost2 or something? I think this is a pretty odd configuration I want but I sort of need it thanks.
Question by:SkyvanMan
LVL 51

Expert Comment

ID: 12710668
either have them listen on different ports, or use at least 2 NICS, or have on NIC with virtual IP
LVL 33

Accepted Solution

humeniuk earned 760 total points
ID: 12713023
You can install 2 (or more) web servers on the same machine.  It's just software after all.  However, you can't have two applications using the same port on the same IP address.  That's where the second IP comes in.  You can either add a second network card or assign an additional IP to the single network card as ahoffman said.

When you configure IIS, you configure it to use one IP (ie. and when you configure Apache, you configure it to use the other (ie.   You can run multiple websites on IIS/ with host headers and multiple websites on Apache/ with virtual hosts.  If you want to run multiple sites with individual IP's, just add more IP addresses to your NIC.

The two web servers will still be in conflict because "when you start Internet Information Services (IIS) 6.0 on Microsoft Windows Server 2003, IIS binds to all IP addresses on the server, not just the IP addresses that are assigned to Web sites" (I believe Apache does the same).  Therefore, you need to bind each server to its specific IP address so that it doesn't bind to all IP addresses, just the one you want it to.

Here's how to do it in Win2k3/IIS6:

Here's how to do it in Apache 2.0:

This same question was asked here: www.experts-exchange.com/Web/Web_Servers/Q_21218472.html, so I've borrowed from my comments there.  You can check out that thread for a bit more detail.

Author Comment

ID: 12713139
well part of your thing expects I am using IIS 6.0 however I am not. I am running XP Pro with IIS 5.1 So is it still the same?
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

LVL 33

Assisted Solution

humeniuk earned 760 total points
ID: 12713259
Good point.  WinXP/IIS5.1 is a fairly limited version of IIS, but I think it is still possible to disable socket pooling - see http://support.microsoft.com/kb/238131.  This applies to IIS5.0 - presumably MS is thinking about Win2k Server here - but it's likely closer than the IIS 6 version.  I did a quick search and couldn't find any reference specifically indicating that it couldn't (or could) be done in IIS 5.1.
LVL 33

Expert Comment

ID: 12713287
More searching, found a couple of reference that suggest kb238131 above will work with IIS 5.1.  Let us know how it works out.
LVL 12

Assisted Solution

avgavg earned 240 total points
ID: 12724318
- Easiest way is to make your apache server listen on port 8080 which will not interfere with IIS which runs on port 80 by default.
- Use Notepad to open the httpd.conf file (you can find it in your apache\apache2\conf directory) and scroll down to find the following lines...

Listen xxx.xxx.xxx.xxx:80 (where xxx.xxx.xxx.xxx is your IP)
#Listen 80  

Only one of the above needs to be enabled (The other can be disabled using the # at the beginning of the line).

- Change the 80 in the first line to 8080

- or if your httpd.conf file uses the Listen 80 line and the IP address line is commented out then, change
Listen 80 to Listen 8080

- Save your httpd.conf file. Make sure Notepad does not add a .txt to the file name :-)
- Restart apache and you are in business.

- You must access your sites on the apache server using the port number in the url...
- Example: http://xxx.xxx.xxx.xxx:8080/yoursitename

To access sites on IIS you don't have to specify the default port 80...
- http://xxx.xxx.xxx.xxx/yoursitename will access your IIS sites.

Good luck!


Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
Loops Section Overview
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses
Course of the Month17 days, 15 hours left to enroll

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question