Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've installed Apache2 on 2 ubuntu 11.10 VMs and I am trying to get a very basic Reverse Proxy working.

I have nothing but the default site setup on each. I want to go to http://server.com/app and have it return http://app.internal.server.com/.

From what I have read it should all be fairly straight forward, but I have no experience with Apache so I am probably missing something!

For example, I haven't set up anything on Apache (other than the ProxyPass directives) to tell it anything about /app.

I enabled mod_proxy with apache2ctl mod_proxy and added the following to httpd.conf then restarted apache2:

ProxyRequests Off
ProxyPreserveHost On
<Proxy *>
    Order allow,deny
    Allow from all
ProxyPass /app/ http://app.internal.server.com/
ProxyPassReverse /app/ http://app.internal.server.com/

In the apache2 error.log I am seeing:

File does not exist: /var/www/app
share|improve this question

1 Answer 1

up vote 0 down vote accepted

You'll need to put the proxy configuration within the default <VirtualHost> block in /etc/apache2/sites-available/default.

Most of that config is inert, by the way - all you need is the ProxyPass/ProxyPassReverse and potentially the ProxyPreserveHost if the backend server needs that.

share|improve this answer
I had to change /app/ to /app otherwise it only worked with the trailing slash.. THANKS! –  neildeadman Feb 5 '12 at 18:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.