Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

0 down vote favorite

I just wanted to test a reverse proxy simple setup, redirecting every request just to google. Anyhow it does not work! Trying to browse on localhost, I just get the apache "it works" default page, but not proxying.

Of course I loaded the modules proxy, proxy_http. Following file is placed under sites-available, with symbolic link in sites-enabled. I also restarted the server. What could be wrong?

      ProxyRequests off
      ProxyPreserveHost On
      <proxy *>
      Order deny,allow
      Allow from all
      </proxy >
      ProxyPass /
      ProxyPassReverse /
</VirtualHost >


share|improve this question
up vote 3 down vote accepted

The default vhost (which serves content from /var/www, where the "It works" page lives) is getting the requests.

It's loading first, and you haven't specified a ServerName for your new vhost, so the "default" vhost will get every request. Run apache2ctl -S - it will show you how it's assigning requests.

If you don't want to use the default site, disable it with a2dissite default, then restart Apache - requests will then be sent to your new proxying <VirtualHost>.

Additionally, your trailing slashes should always match when proxying. Add them at the end:

ProxyPass /
ProxyPassReverse /
share|improve this answer

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.