Apache Reverse Proxy Configuration

Despite rumors to the contrary, configuring Apache as a reverse proxy isn’t all that hard. Here’s an example: 

# Apache 2 VHost Config for Reverse Proxy Domain Routing
# for local container based development

#################################################################
#################### Apache VHost Config: #######################
#################################################################
# NameVirtualHost *:80
<VirtualHost *:80>
ServerName project-alpha.docker.local

ErrorLog "var/log/httpd/project-alpha_docker_error_log"
CustomLog "var/log/httpd/project-alpha_docker_access_log" common
ProxyRequests Off

<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / http://localhost/
ProxyPassReverse / http://localhost/
</VirtualHost>

<VirtualHost *:80>
ServerName project-gamma.docker.local

ErrorLog "var/log/httpd/project-gamma_docker_error_log"
CustomLog "var/log/httpd/project-gamma_docker_access_log" common
ProxyRequests Off

<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / http://localhost/
ProxyPassReverse / http://localhost/
</VirtualHost>


#################################################################
################### Local "hosts" file: #########################
#################################################################
# ...
127.0.0.1 project-alpha.docker.local
127.0.0.1 project-gamma.docker.local
# ...