Setup Apache Reverse Proxy to Torquebox
Setup Apache as a Reverse Proxy in front of a standalone Torquebox server.
For this to work Apache must have the mod_proxy module loaded:
Config file: /etc/httpd/conf/httpd.conf
ProxyRequests Off # Switch off forward proxy
ProxyPreserveHost On # Pass host name onto the proxy
ProxyPass /myapp http://localhost:8080/myapp/ # Map url to remote server
ProxyPassReverse /myapp http://localhost:8080/myapp/ # Adjust header sent from remote server to match url
Here we are passing all calls to the /myapp/ url on to the Torquebox server http://localhost:8080/myapp/
In your Torquebox application folder create a file ‘config/torquebox.yml’ which contains a context which matches the Apache reverse proxy url.