On Tuesday, March 13, 2001, at 07:04 PM, Jeroen Massar wrote:
> Boo :)
>
> After some fiddling around I came to the following config (excerpt of important
> parts):
> 8<-----------------
> LoadModule proxy_module /usr/local/libexec/apache/libproxy.so
> ProxyRequests Off
> CacheRoot /usr/local/www/proxy
> CacheSize 5
> CacheGcInterval 4
> CacheMaxExpire 24
> CacheLastModifiedFactor 666.0
> CacheDefaultExpire 1
> ProxyPass /other/ http://box2/other/
> ProxyPassReverse /other/ http://box2/other/
> -------------------->8
>
> This allows access to the /other/ dir through box1, though the dir actually resides
> on box2...
> Box1 is running an Apache 1.3.19+IPv6 on FreeBSD.
>
> The following questions arise:
> - The CacheRoot dir contains mangled filenames, could these be non-mangled,
> preserving their original names and path so I could put them into the /other/ dir
> effectively mirroring on-demand... see also point 3...
>
IIRC, these are the uuencoded MD5 hashes of the URL, as relative paths. They're
pretty deeply wired into the cache for performance and uniqueness.
> - It also caches it correctly, except for some non-static files... which headers
> are required to make sure a file will be cached into the cache?
>
Date, Expires, If-Modified-Since, Last-Modified. See RFC 1945 for HTTP/1.0, which
I believe is the proxy you are using.
> - Whenever I turn off box2, box1 will start spitting 502's (Bad gateway - proxy
> error) because it can't contact box2.
This is (minimally, for 1.1) correct HTTP/1.[01] behavior.
> Is there a fallback to serve directly from the cache (at least the data it has...
>the
> rest should 404... ) ?
>
This sounds like a job for a Warning:111 Revalidation failed. This is optional in
HTTP/1.1.
> NOTE: This last thing will also probably happen with all the apache.org mirror's
> around the world using the:
> 8<-----------
> ProxyPass / http://www.apache.org/
> CacheDefaultExpire 24
> ------------->8
> Method as described on http://www.apache.org/info/how-to-mirror.html...
>
Mmmm.
Chuck
Chuck Murcko
Topsail Group
http://www.topsail.org/