IIS and Apache at the same time

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.
LVL 5
SkyvanManAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ahoffmannCommented:
either have them listen on different ports, or use at least 2 NICS, or have on NIC with virtual IP
0
humeniukCommented:
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. 192.168.100.101) and when you configure Apache, you configure it to use the other (ie.192.168.100.102).   You can run multiple websites on IIS/192.168.100.101 with host headers and multiple websites on Apache/192.168.100.102 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:
http://support.microsoft.com/default.aspx?scid=kb;en-us;813368&Product=iis60

Here's how to do it in Apache 2.0:
http://httpd.apache.org/docs-2.0/bind.html
http://httpd.apache.org/docs-2.0/mod/mpm_common.html#listen


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.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
SkyvanManAuthor Commented:
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?
0
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

humeniukCommented:
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.
0
humeniukCommented:
More searching, found a couple of reference that suggest kb238131 above will work with IIS 5.1.  Let us know how it works out.
0
A V GeorgeAdditional General ManagerCommented:
- 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!

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Apache Web Server

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.