Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have 2 web servers: one linux server running apache and one windows server running IIS. Is it possible for me to make both servers share the same url and subdomain. For example, can I make http:// run off of IIS and have http:// run off of apache? I don't want to use subdomains to make this work.

share|improve this question

You can use mod_proxy in Apache to forward requests to on to the IIS service, if Apache is the main webserver of the two (i.e. it responds directly to port 80 on the address points to).

The other option is to have neither Apache or IIS as the primary service on the standard port(s), having a dedicated reverse proxy instead that is configured to forward requests to IIS and Apache as appropriate.

share|improve this answer

One option would be to have everything for go to apache, and then use the mod_proxy to forward everything for off to your IIS server.

share|improve this answer

In a standard setup, No. If you were running IIS and Apache on the same server, then they would need to be on different ports, only one of them could use port 80, therefore your URL for the other would have to include the port number.

There maybe some way to use something like Mod proxy as suggested to hand off request for certain URLs to the other server, but you would still have the issue of the URL needing to contain the port number, unless IIS is on another machine. You would need to designate one server to be primary and listen on port 80, and deal with handing off any requests to the other server.

share|improve this answer

You cannot accomplish this without making one of the servers the owner of both URLs. You would then take the default server, I'll call it, and issue redirects to another URL that would resolve to the IP address of your other server.

For example:

Linux Server IP1 =, where IP1 is the IP address of the url shown.

In the httpd.conf file you would put a redirect directive to match anything against and send it to which would resolve to the IP of the other server. can then just point to a local directory of your choice.

IIS Server IP2 = where IP2 is the IP address of another URL as shown.

The Rewrite rule can be something like this:

RewriteEngine On RewriteRule ^iis/?$

As an aside note, we do something similar to redirect HTTP traffic to our HTTPS site for certain things.... like if you type, we redirect to https of the same.

RewriteEngine On RewriteCond %{SERVER_PORT} !^443$ RewriteRule (.*) https://webmail.mycompany.corp/ [R=301,L]

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.