What's the best way to use both IIS and Apache? Are there any major flaws in how I am hoping to solve this?
October 20, 2008 9:48 AM   Subscribe

I do not know if what I am imagining about how to solve my web server problem is realistic or not. Is there a better solution than the ones I have thought of? This concerns addings IIS to my machine that is currently running Apache only...

I have a couple of Joomla sites running on Apache/MySQL on a Vista Ultimate box. Running on Vista instead of Windows Server 2003 or Linux may be the first problem, but it is what I have for now. In the worst case, I will install something new. But, for now, Vista it is.

So far, I have one static IP address, and it is connected to a couple of domain names:

www.firstdomain.com = /apache/joomla1
www.seconddomain.com = /apache/joomla2

What I need to do is add IIS and MS SQL for another application that I have to host.

The easy solution is to make IIS listen on Port 8080 (or anything other than 80). However, I do not think this will be possible because does that not mean that users will have to type www.thirddomain.com:8080 when they want to visit this new site? No one will know to type 8080, so this will probably not be the best solution.

Solutions that my inexperienced brain has tried to come up with:

a) Put a temporary page on apache so that
www.thirddomain.com = /apache/temporary, and this page in the apache directory re-directs to www.thirddomain.com:8080

Problem: what if someone enters www.thirddomain.com/firstdirectory/firstsubdirectory/file.asp&param1=a ... this will not successfully redirect then, will it?

b) Install some sort of reverse proxy on apache that looks at incoming requests and modifies the URL so that it adds the 8080 to each www.thirddomain.com/* request in the correct place.

Problem: are there any easy to install/configure reverse proxies out there? Do I even correctly understand what a reverse proxy does?

c) Get 2 IP addresses, trick IIS and Apache to both use Port 80 (I have found a site that kind of explains how to do this), and have each web server only respond to a specific IP address.

Problem: has anyone heard of this or done this? Will this work on Vista? The people discussing it in the now dead forum were using Windows 2003 server

d) ** Your solution here **

Please help!

Thank you kindly.
posted by omair to Computers & Internet (4 answers total) 3 users marked this as a favorite
You want to use mod_proxy to serve the IIS site through apache.

Essentially you set up the virtual host on Apache so that it handles requests and then proxies them to the IIS server (running on another port) but the port diff is transparent to the user.

I've only done this to deploy a mongrel cluster with Rails and I followed this tutorial:


The basics of what you want to do though are the same.
posted by bitdamaged at 10:08 AM on October 20, 2008

oh the correct term to google is "reverse proxy" with apache
posted by bitdamaged at 10:14 AM on October 20, 2008

c) will work and there is no "trick" involved. Apache would be configured to listen on IP Address 1 only and IIS would be configured to listen on IP address 2 only. This is standard stuff that is easily configured in either server product.
posted by mmascolino at 10:21 AM on October 20, 2008

In addition to what everyone else said:

1) Use IIS as a reverse-proxy - this behavior is built-in I think.
2) Install PHP in IIS, and ditch apache altogether.


3) Fundamentally, the way you are approaching this is a somewhat bad practice. It's good for learning, but not something you'd generally do in a production environment. Put each configuration on a separate VM instance, and manage them separately. This will benefit you later when you have to grow out of a single box.
posted by TravellingDen at 2:50 PM on October 20, 2008

« Older Absentee Ballot Counting   |   Help with German-to-English medical translation Newer »
This thread is closed to new comments.