Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

ReverseProxy help.

How to pass static content requests to another server



9:37 pm on May 26, 2011 (gmt 0)

Hi. I have set up Nginx to handle static content so that Apache's "prefork" processes are focused on doing the heavylifting related to PHP.

Nginx is working. I set it up on the same server, but a different port. Confirmed working at [EXAMPLEDOMAIN.com:81....]

Inside Apache I now want to internally redirect all my access to images to NGINX:

ProxyRequests Off
ProxyPreserveHost On
ProxyPass /main/images
ProxyPassReverse /

But this is not working as I think it would.

The following URL is live and works:

This gives a 404:

Any ideas what I can change to make this work? aren't the Apache setting correct?




1:08 am on May 28, 2011 (gmt 0)

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

In most cases like this, the paths specified for ProxyPass and ProxyPassReverse should be the same.

Make sure this config block isn't located inside a <Location> container that would further (and undesirably) qualify it. Also, ProxyPass and ProxyPassReverse cannot be used inside <Directory> or <Files> containers.



2:23 am on May 28, 2011 (gmt 0)

Thanks Jim. Can this be inside a VirtualHost container? Right now it is outside, just at the end of httpd.conf, and still NOT working.

I even changed the to

ProxyRequests Off
ProxyPreserveHost On
ProxyPass /site/images
ProxyPassReverse /site/images

This is still giving 404. In error_log, apache just says file not found or unable to stat.

I have checked through "httpd -M" and all the proxy modules are in fact enabled!

What am I missing? Thanks.

Featured Threads

Hot Threads This Week

Hot Threads This Month