You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Randall Mackie <ra...@geosystem.us> on 2005/12/12 19:14:06 UTC

[users@httpd] strange cache problem with Apache

We have set up an Apache web server on our dedicated linux server, but are
experiencing some strange issues with cache. First, the details:

Linux server, running Mandriva Linux 2006.
Apache 2.0.54 with the following rpms installed:

apache-mod_disk_cache-2.0.54-13mdk
apache-mod_suexec-2.0.54-4mdk
apache-conf-2.0.54-12mdk
apache-doc-2.0.54-2mdk
apache-base-2.0.54-13mdk
apache-mpm-prefork-2.0.54-13mdk
apache-mod_proxy-2.0.54-13mdk
apache-mod_ssl-2.0.54-6mdk
apache-mod_php-2.0.54_5.0.4-4mdk
apache-modules-2.0.54-13mdk
apache-mod_cache-2.0.54-13mdk
apache-mod_perl-2.0.54_2.0.1- 6mdk


We have set up our web server with the domain www.geosystem.us.
We have aliased our other names to the web server, using the following
lines in our httpd.conf file:

NameVirtualHost *:80

<VirtualHost *:80>
ServerName www.geosystem.us
ServerAlias geosystem.us www.geosystem.net www.geosystem.it www.gsy-usa.com
VirtualDocumentRoot /var/www/html/www.geosystem.us/web/
VirtualScriptAlias /var/www/html/www.geosystem.us/cgi/
</VirtualHost>


www.geosystem.net, www.geosystem.it, etc all point to our web server address.


The problem: when we update some of the html files in the document root,
those changes do not become immediately observable when we try to load
the web page unless we clear /var/cache/httpd first (regardless of whether we
clear the cache in our web browsers).

Even stranger, we only experience this problem with one of the aliased
domain names (www.geosystem.net). The others work fine.

Is this a configuration issue, or some other issue?

Is there a way to set up the cache, or set the cache to zero? In other words,
why does Apache cache the files? If they are changed, why doesn't Apache serve
up the new files?

Thanks in advance for any help.

Randy M.

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


Re: [users@httpd] strange cache problem with Apache

Posted by Joshua Slive <js...@gmail.com>.
On 12/12/05, Randall Mackie <ra...@geosystem.us> wrote:

> apache-mod_disk_cache-2.0.54-13mdk
> apache-mod_cache-2.0.54-13md
> apache-mod_proxy-2.0.54-13mdk
>
> It appears that I can uninstall those rpms, and that removes the /var/cache/http
> as well. If we're just serving up static files, then I would assume I don't
> need the proxy and cache modules? Is that correct?

Yes.

Joshua.

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


Re: [users@httpd] strange cache problem with Apache

Posted by Randall Mackie <ra...@geosystem.us>.

Joshua Slive wrote:
> On 12/12/05, Randall Mackie <ra...@geosystem.us> wrote:
> 
>>The problem: when we update some of the html files in the document root,
>>those changes do not become immediately observable when we try to load
>>the web page unless we clear /var/cache/httpd first (regardless of whether we
>>clear the cache in our web browsers).
>>
>>Even stranger, we only experience this problem with one of the aliased
>>domain names (www.geosystem.net). The others work fine.
>>
>>Is this a configuration issue, or some other issue?
>>
>>Is there a way to set up the cache, or set the cache to zero? In other words,
>>why does Apache cache the files? If they are changed, why doesn't Apache serve
>>up the new files?
> 
> 
> Are you sure it is apache caching the files and not another proxy
> inbetween?  If it is apache, then it would be caused by the
> CacheEnable directives someplace in your config files. I'm guessing
> that mandrake uses some complicated config that automatically enables
> the caching directive whenever you load mod_cache.
> 
> As to why apache sends the cached version, it is because mod_cache
> uses ordinary http caching rules to determine whether a cache entry is
> fresh.  If you are serving static files, then there is usually no need
> to put mod_cache in front.  Without mod_cache, apache will always
> serve the most up-to-date version.
> 
> Joshua.
> 
> 

Hi Joshua,

Thanks for your response. I don't know about Mandrake, but I suspect the caching
is enabled by the modules:

apache-mod_disk_cache-2.0.54-13mdk
apache-mod_cache-2.0.54-13md
apache-mod_proxy-2.0.54-13mdk

It appears that I can uninstall those rpms, and that removes the /var/cache/http
as well. If we're just serving up static files, then I would assume I don't
need the proxy and cache modules? Is that correct?

Thanks, Randy


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


Re: [users@httpd] strange cache problem with Apache

Posted by Joshua Slive <js...@gmail.com>.
On 12/12/05, Randall Mackie <ra...@geosystem.us> wrote:
> The problem: when we update some of the html files in the document root,
> those changes do not become immediately observable when we try to load
> the web page unless we clear /var/cache/httpd first (regardless of whether we
> clear the cache in our web browsers).
>
> Even stranger, we only experience this problem with one of the aliased
> domain names (www.geosystem.net). The others work fine.
>
> Is this a configuration issue, or some other issue?
>
> Is there a way to set up the cache, or set the cache to zero? In other words,
> why does Apache cache the files? If they are changed, why doesn't Apache serve
> up the new files?

Are you sure it is apache caching the files and not another proxy
inbetween?  If it is apache, then it would be caused by the
CacheEnable directives someplace in your config files. I'm guessing
that mandrake uses some complicated config that automatically enables
the caching directive whenever you load mod_cache.

As to why apache sends the cached version, it is because mod_cache
uses ordinary http caching rules to determine whether a cache entry is
fresh.  If you are serving static files, then there is usually no need
to put mod_cache in front.  Without mod_cache, apache will always
serve the most up-to-date version.

Joshua.

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