====== Resources for Apache Reverse Proxy ======
[[http://ubuntuforums.org/showthread.php?t=715082|A thread]]
[[http://www.apachetutor.org/admin/reverseproxies|The guide]]
===== Sample configuration =====
Listen 80
NameVirtualHost *:80
#Repeat below section for each proxy
ServerAdmin someone@example.com
DocumentRoot /var/www/html
ServerName abc.xyz.example.com
ServerAlias yyy.example.com
# mod_proxy setup.
ProxyPreserveHost On
RequestHeader unset Authorization
ProxyRequests Off
ProxyPass / http://somelocalserver:7503/
ProxyPassReverse / http://somelocalserver:7503/
Order deny,allow
Allow from all
ErrorLog logs/somelocalserver-7503-error_log
CustomLog logs/somelocalserver-7503-access_log common
===== Sample configuration - yahoo =====
Below is a sample to show how apache redirects traffic to www.yahoo.com when accessing your apache server using reverse proxy. However any links on the page will redirect to yahoo directly in this example.
ProxyPass http://www.yahoo.com
ProxyPassReverse http://www.yahoo.com
Order allow,deny
allow from all
===== Another example - shellinabox =====
Here all access to the said apache URL will redirect to localhost port 4200. This is useful to not have to open an additional port to serve out another service but access everything from apache (port 80, if so configured) by configuring a virtual apache host. Some services don't require ProxyPassReverse setting as there are no links to click on the target. This particular configuration was used to run [[http://code.google.com/p/shellinabox/|shellinabox]] access over apache. Related topic: [[tech:linux:startup_script_for_shellinabox|Startup script for shellinabox]]
ProxyPass http://localhost:4200/
Order allow,deny
allow from all