configuring disk cache look-up before proxying

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux