Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

Disclaimer: I am very new to mod_proxy and somewhat new to apache in general.

I have a very simple virtual host with the following configuration:

<VirtualHost *:80>
    ServerName myhost.mydomain

    <IfModule mod_proxy.c>
    ProxyRequests Off

    ProxyPass /mysite
    ProxyPassReverse /mysite



When I go to http://myhost.mydomain/mysite it displays the expected result, ie Google's home page, but it does not send Google's images over. When I look at the source for an image, it is in terms of myhost.mydomain rather than a Google URI, which is expected. What isn't expected is why the images are not being fetched by mod_proxy and sent down to me. How do I make mod_proxy "recursive" a la mod_rewrite. In that same vein, if I am already familiar with mod_rewrite, why bother with mod_proxy at all?

share|improve this question
up vote 2 down vote accepted

Google's resources on the page are in the form img src="/images/srpr/logo3w.png" or similar; this causes them to be fetched from the root of the site.

Take a look at how you've configured proxying; /mysite/images/srpr/logo3w.png is the request the client browser would have needed to send to get the image. Switch to..

ProxyPass /

and everything ought to work.

mod_proxy_html is designed to alter link paths to function correctly in the context of the proxy, but don't count on it working correct for a site that you don't control, especially if any of the link building is done in client side javascript.

mod_rewrite and mod_proxy serve completely different purposes; if you use the [P] flag in mod_rewrite then you're actually utilizing mod_proxy, but in a less efficient way than just configuring ProxyPass.

share|improve this answer
Thank you for the info re: mod_proxy_html, since the situation of link building through clientside js is exactly the situation im facing – tacos_tacos_tacos Oct 2 '12 at 21:23

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.