I'm trying to get a mod_disk_cache setup to proxy the content
generated by a proxy-balanced backend but am running into some
problems.

Here is a snip of the .conf

################ CONF ####################
IfModule mod_cache.c>
<IfModule mod_disk_cache.c>
UseCanonicalName On
CacheRoot /pagecache
CacheEnable disk /
CacheDisable /image_assets
CacheDisable /images
CacheDisable /pictures
CacheDisable /flash
CacheIgnoreNoLastMod On
CacheIgnoreCacheControl Off
CacheIgnoreHeaders Set-Cookie
CacheDefaultExpire 360
CacheDirLevels 2
CacheDirLength 1
</IfModule>
</IfModule>

<Proxy balancer://sitev2_cluster>
ExpiresActive On
ExpiresDefault A86400
ExpiresByType application/xml A600
ExpiresByType text/xml A300
ExpiresByType text/html A300
ExpiresByType image/x-icon A2592000
ExpiresByType text/javascript A644800
ExpiresByType text/css A644800
ExpiresByType image/gif A604800
ExpiresByType image/png A604800
ExpiresByType image/jpeg A604800
ExpiresByType application/x-shockwave-flash A604800
ExpiresByType video/x-flv A604800
ExpiresByType application/pdf A604800
# Header set Cache-Control "must-revalidate"
Header unset Vary
BalancerMember http://127.0.0.1:7000
BalancerMember http://127.0.0.1:7001
BalancerMember http://127.0.0.1:7002
</Proxy>

ProxyPass / balancer://sitev2_cluster/
ProxyPassReverse / balancer://sitev2_cluster/
ProxyRequests Off

################ END CONF ####################

Now files are being written to /pagecache so it appears to work until
you look at the headers and log that the backend generates. It seems
that it still gets hit for content that should be cached. For example
the homepage will show up as being requested in the backend logs at
01:05:00 that should then be picked up and used by Apache for 5minutes
right?

Instead I'll see more requests for it at 01:05:10 01:05:30 01:06:00
etc. Does Apache check with the backend for some reason before serving
up the cached version?

The backend doesn't write files itself but does return a Content-Type:
for text/html, application/xml or whatever is appropriate.

Also it seems that sometimes headers come back that show the backend
was not hit.  Meaning the first set of headers sent to the browsers
send a "Server: Backend" but on reloading the page the "Server: Apache
2.2.3" shows up.

However opening up the page in a different browser results in again
"Server: Backend"

Anyone having any experience with this type of setup I'd really
appreciate hearing from you.

---------------------------------------------------------------------
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: [EMAIL PROTECTED]
  "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to