httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Michaux" <petermich...@gmail.com>
Subject [users@httpd] configuring disk cache look-up before proxying
Date Wed, 26 Nov 2008 21:40:22 GMT
I have Apache set up with the following as the first virtual host.
Since the first host is the default, this gives me mass hosting
behavior. Also the back-end server running on port 3000 sees the
original request Host header which it needs to see.

<VirtualHost *:80>
  ServerName example.com
  ProxyPass / http://localhost:3000/
  ProxyPassReverse / http://localhost:3000/
  ProxyPreserveHost on
</VirtualHost>

The back end server caches files in two different places and I would
like Apache to look in those two places and only proxy if the cached
file cannot be found. For example, a request to

http://alpha.example.com/some/page

should first look in

/var/cache/app/alpha.example.com/www/some/page

and then in

/var/lib/app/alpha.example.com/www/some/page

and only proxy the request if those files do not exist.

I have been looking in mod_proxy and mod_cache but am either missing a
piece or cannot see how the pieces fit together.

If anyone has a suggestion for the configuration or which directives
might help, I'd appreciate any advice.

Thank you,
Peter

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message