Wednesday, October 10, 2007

Set up Apache as a reverse proxy

Since my client's VPS doesn't have enough memory to run a servlet engine with their app, and we don't have time to move to a bigger VPS, I'm looking for interim solutions. One idea is to use their Apache server as a proxy server to an external server.

Here's the situation. Their website has an SSL certificate with www.company.com in the domain. We can't move their site, and the SSL cert couldn't be used with a subdomain. So, if I set up a server somewhere else at say app.company.com, I could add the following to their SSL site's VirtualHost:
ProxyRequests Off

Order deny,allow
Allow from all

ProxyPass /app http://app.company.com/app
ProxyPassReverse /app http://app.company.com/app
This seems to work, but I haven't tested it fully yet. I am having issues with image paths and such, but that is to be expected.

Apache provides details of using mod_proxy.

There are also details about other options for connecting to Tomcat with various means, including using iptables, mod_jk2, and mod_proxy.

No comments:

 

Labels

Labels