On Thu, Jan 9, 2014 at 4:47 PM, Charles W Buege <cbu...@moreycorp.com>wrote:
> Now when someone from the outside world goes to 'www.mycompany.com' > (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): <VirtualHost www.example.com:80> ServerAdmin ad...@example.com DocumentRoot "/srv/www/sites/example.com/" ServerName example.com ServerAlias www.example.com ErrorLog "logs/example.com_error.log" CustomLog "logs/example.com_access.log" combined ProxyPass / http://192.168.200.20/ ProxyPassReverse / http://192.168.200.20/ 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] </VirtualHost> > 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 www.mycompany.com, > anothersite.mycompany.com, and thirdsite.mycompany.com 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