Apache 2.2 cache proxy

This is a discussion on Apache 2.2 cache proxy within the Apache Web Server forums, part of the Web Server and Related Forums category; Hello, I need to know if apache 2.2 is able to cache any content that would be returned from ...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 09-22-2007
asrenzo
 
Posts: n/a
Default Apache 2.2 cache proxy

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/VirtualHostBase/http/%{HTTP_HOST}:%{SERVER_PORT}/Examples/VirtualHostRoot/$1
[L,P]
</VirtualHost>

Any idea ?

Regards,

Laurent
  #2 (permalink)  
Old 09-22-2007
asrenzo
 
Posts: n/a
Default Re: Apache 2.2 cache proxy

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/VirtualHostBase/http/%{HTTP_HOST}:%{SERVER_PORT}/Examples/VirtualHostRoot/$1
> [L,P]
> </VirtualHost>
>
> Any idea ?
>
> Regards,
>
> Laurent

 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 11:37 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0