httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Merrell <>
Subject [users@httpd] Struggling with Reverse Proxy Configuration for Server with multiple subdomains
Date Thu, 14 Mar 2013 16:15:32 GMT
Our web application (an LMS) uses three subdomains to serve its content:

These are all vhosts running off of 1 server. My end goal is to use
mod_proxy as a reverse proxy and to load balance between two servers.
Until we can make changes to the app to be more tolerant to HA
systems, the load balancer will most likely need to be Active/Passive
between two back end servers.

I'm new to mod_proxy, so I've started off with just trying to set up a
1:1 reverse proxy, meaning one proxy server sending all traffic to one
server only. But I can't seem to get that working. Every example I can
find for setting up a reverse proxy uses examples like
"$FUNCTION" as the public side and "$'
as the private. For example, on the proxy goes
to on the private side. on
the proxy goes to on the private side. I can't do
this without considerable changes to how our application works. What i
need is for on the proxy to go to on
the back end. Same for shared and training.

On the proxy I tried configuring 3 vhosts (,, and An example is like the
following:(proxy is and host 1 is

<IfModule mod_proxy.c>
ProxyRequests Off
ProxyPreserveHost On

ProxyPass /
ProxyPassReverse /

<Proxy *>
Order deny,allow
Allow from all


I have the same thing for training and shared as well. Then on the
backend server, I have a standard vhost configuration for the three
vhosts (meaning if I change my dns to resolve to, the
web page functions as expected).

With this set up, and my DNS resolving to the proxy for all three
subdomains, I can pull up the few items that loads from "home", but
anything being requested from shared (training isn't used on the login
screen) gets a 404. When I look at the backend server looks, the 404
is looking in home's document root instead of Shared. So it seems that
all requests being passed to the back end server are going to the
default vhost and not based off of the Host name.Everything I can find
regarding this type of error have lead to making sure the
NameVirtualHost and VirtualHost directives match, which they do and it
still seems to go to the first vhost listed.

So a couple questions I have are
1) Is what I'm planning to accomplish even doable? I figured if it was
I'd at least be able to find just one example out on the Internet, but
I haven't been able to, which has created doubt as to whether I'm
fully understanding how mod_proxy works.
2) If it is doable, what config changes do I need to make so it uses
the hostname instead of the default vhost?
3) If I can get this part to work, am I going to have any problems in
getting an Active/Passive load balancer set up?

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message