|
Home > Archive > Apache Server configuration support > September 2007 > Apache 2.2 cache proxy
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Apache 2.2 cache proxy
|
|
| asrenzo 2007-09-22, 7:20 am |
| Hello,
I need to know if apache 2.2 is able to cache any content that would be
returned from an upstream server (aka Zope in this case). I know how to
do that with a squid server but I have to find a solution with apache
only. I need to configure apache to force a cache of any content without
Zope rendrering cache control headers.
Here's what I started but I can't see any file in my cache directory and
total number of request per second is stable, so I think my
configuration is false but I can not find where.
LoadModule cache_module modules/mod_cache.so
LoadModule disk_cache_module modules/mod_disk_cache.so
LoadModule file_cache_module modules/mod_file_cache.so
LoadModule mem_cache_module modules/mod_mem_cache.so
ProxyRequests On
<Proxy *>
Order deny,allow
Deny from all
Allow from all # For test only
</Proxy>
ProxyVia On
CacheEnable disk /
CacheRoot "/var/cache/mod_proxy"
CacheDirLevels 5
CacheDirLength 3
CacheDefaultExpire 60
<VirtualHost *:80>
ServerName www.monsite.com
DocumentRoot /home/zope/data/www
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/files(.*)
RewriteCond %{REQUEST_URI} !^/common(.*)
RewriteCond %{REQUEST_URI} !^/design(.*)
RewriteCond %{REQUEST_URI} !^/robots.txt
RewriteRule ^/(.*)
http://127.0.0.1:8080/VirtualHostBa...{HTTP_HOST}:%{SERVER_PORT}/Examples/VirtualHostRoot/$1
[L,P]
</VirtualHost>
Any idea ?
Regards,
Laurent
| |
| asrenzo 2007-09-22, 1:17 pm |
| For anybody trying to fix this problem, here is the solution:
Add this directive to your configuration:
CacheIgnoreNoLastMod On
Regards,
Laurent
asrenzo a écrit :
> Hello,
>
> I need to know if apache 2.2 is able to cache any content that would be
> returned from an upstream server (aka Zope in this case). I know how to
> do that with a squid server but I have to find a solution with apache
> only. I need to configure apache to force a cache of any content without
> Zope rendrering cache control headers.
>
> Here's what I started but I can't see any file in my cache directory and
> total number of request per second is stable, so I think my
> configuration is false but I can not find where.
>
> LoadModule cache_module modules/mod_cache.so
> LoadModule disk_cache_module modules/mod_disk_cache.so
> LoadModule file_cache_module modules/mod_file_cache.so
> LoadModule mem_cache_module modules/mod_mem_cache.so
>
> ProxyRequests On
>
> <Proxy *>
> Order deny,allow
> Deny from all
> Allow from all # For test only
> </Proxy>
>
> ProxyVia On
>
> CacheEnable disk /
> CacheRoot "/var/cache/mod_proxy"
> CacheDirLevels 5
> CacheDirLength 3
> CacheDefaultExpire 60
>
> <VirtualHost *:80>
> ServerName www.monsite.com
> DocumentRoot /home/zope/data/www
>
> RewriteEngine on
>
> RewriteCond %{REQUEST_URI} !^/files(.*)
> RewriteCond %{REQUEST_URI} !^/common(.*)
> RewriteCond %{REQUEST_URI} !^/design(.*)
> RewriteCond %{REQUEST_URI} !^/robots.txt
> RewriteRule ^/(.*)
> http://127.0.0.1:8080/VirtualHostBa...{HTTP_HOST}:%{SERVER_PORT}/Examples/VirtualHostRoot/$1
> [L,P]
> </VirtualHost>
>
> Any idea ?
>
> Regards,
>
> Laurent
|
|
|
|
|