httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yehuda Katz <>
Subject Re: [users@httpd] Proxy questions - part 2
Date Thu, 09 Jan 2014 22:21:51 GMT
On Thu, Jan 9, 2014 at 4:47 PM, Charles W Buege <>wrote:

> Now when someone from the outside world goes to ''
> (which I presume via DNS matches the IP address of Physical Server 1), I'd
> like the proxy server to pass along the request to Physical Server 2.

Correct. This is my basic Virtual Host template adapted to your example (I
tested it too):
 DocumentRoot "/srv/www/sites/"
ErrorLog "logs/example.com_error.log"
 CustomLog "logs/example.com_access.log" combined

ProxyPass /
 ProxyPassReverse /

RewriteEngine On # if maintenance.html exists RewriteCond
%{DOCUMENT_ROOT}/maintenance.html -f # and the request is not for
maintenance.html RewriteCond %{REQUEST_URI} !^/maintenance\.html$ #
redirect to maintenance.html RewriteRule ^(.*)$ /maintenance.html [L]

> I'd also like it to happen where if Physical Server 4's Apache instance is
> down for maintenance (backups, year end processing, etc.), that the Proxy
> Server (Physical Server 1) can display a message saying that the site is
> down for maintenance.  I'm presuming this would be handled via the
> 'ErrorDocument 503' that you mentioned in your last e-mail, yes?
The 503 is best for unplanned outages since it does not show until the
attempt to connect to the backend server times out.

> I also presume that the DNS entries for,
>, and would all have the
> same IP address and then the Proxy Server (Physical Server 1) would play
> 'traffic cop' and then forward the necessary traffic to the proper host
> behind the scenes.
Correct. And as in my example, I would put the IP addresses of the internal
servers so they don't have to do DNS lookups.

> Also if anyone wants to point me towards somewhere where I can learn more
> about this (web site, books, etc.) so I'm not cluttering up this mailing
> list with newbie questions, please feel free to point me that way.

This list is a perfectly reasonable place.

- Y

View raw message