Package: apache2-common Version: 2.0.52-3 Severity: important I have a tomcat installation behind a caching apache 2. At first it seems to work:
~$ sudo /etc/init.d/apache2 restart Restarting web server: Apache2. ~$ wget -q -O- -s http://michiel.omroep.nl/mm18/ | head -12 HTTP/1.1 200 OK Date: Wed, 29 Dec 2004 18:02:45 GMT Server: Apache-Coyote/1.1 Expires: Wed, 29 Dec 2004 18:03:45 GMT Cache-Control: public Content-Type: text/html;charset=UTF-8 Content-Language: nl Content-Length: 3350 Via: 1.0 michiel.omroep.nl Connection: close <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> ~$ wget -q -O- -s http://michiel.omroep.nl/mm18/ | head -12 HTTP/1.1 200 OK Date: Wed, 29 Dec 2004 18:02:48 GMT Server: Apache/2.0.52 (Debian GNU/Linux) mod_ssl/2.0.52 OpenSSL/0.9.7b Expires: Wed, 29 Dec 2004 18:03:45 GMT Cache-Control: public Content-Type: text/html;charset=UTF-8 Content-Language: nl Content-Length: 3350 Via: 1.0 michiel.omroep.nl Age: 3 Keep-Alive: timeout=15, max=100 Connection: Keep-Alive ~$ As you see, the second hit is cached. Now, we wait a minute (until the page expires). ~$ wget -q -O- -s http://michiel.omroep.nl/mm18/ | head -12 HTTP/1.1 200 OK Date: Wed, 29 Dec 2004 18:03:47 GMT Server: Apache-Coyote/1.1 Expires: Wed, 29 Dec 2004 18:04:47 GMT Cache-Control: public Content-Type: text/html;charset=UTF-8 Content-Language: nl Content-Length: 3350 Via: 1.0 michiel.omroep.nl Connection: close <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> ~$ wget -q -O- -s http://michiel.omroep.nl/mm18/ | head -12 HTTP/1.1 200 OK Date: Wed, 29 Dec 2004 18:03:50 GMT Server: Apache-Coyote/1.1 Expires: Wed, 29 Dec 2004 18:04:50 GMT Cache-Control: public Content-Type: text/html;charset=UTF-8 Content-Language: nl Content-Length: 3350 Via: 1.0 michiel.omroep.nl Connection: close <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> ~$ Now it's not cached any more, and none of the subsequent hits will be, so effectively caching is not working. Perhaps you may need this: /etc/apache2/mods-enabled$ ls -l total 4 lrwxr-xr-x 1 root root 28 2004-12-29 17:48 00-proxy.load -> ../mods-available/proxy.load lrwxr-xr-x 1 root root 37 2004-12-29 18:26 asis.load -> /etc/apache2/mods-available/asis.load lrwxr-xr-x 1 root root 37 2004-12-29 17:44 cgid.conf -> /etc/apache2/mods-available/cgid.conf lrwxr-xr-x 1 root root 37 2004-12-29 17:44 cgid.load -> /etc/apache2/mods-available/cgid.load lrwxr-xr-x 1 root root 36 2004-12-29 18:11 cgi.load -> /etc/apache2/mods-available/cgi.load lrwxr-xr-x 1 root root 30 2004-12-29 17:45 headers.load -> ../mods-available/headers.load lrwxr-xr-x 1 root root 32 2004-12-29 17:45 mem_cache.load -> ../mods-available/mem_cache.load lrwxr-xr-x 1 root root 33 2004-12-29 17:46 mime_magic.load -> ../mods-available/mime_magic.load -rw-r--r-- 1 root root 290 2004-12-29 18:18 proxy.conf lrwxr-xr-x 1 root root 26 2004-12-29 17:48 ssl.load -> ../mods-available/ssl.load lrwxr-xr-x 1 root root 40 2004-12-29 17:44 userdir.conf -> /etc/apache2/mods-available/userdir.conf lrwxr-xr-x 1 root root 40 2004-12-29 17:44 userdir.load -> /etc/apache2/mods-available/userdir.load /etc/apache2/mods-enabled$ cat proxy.conf # see mowgli:/e/fp/../conf #cache CacheDefaultExpire 5 CacheMaxExpire 30 CacheIgnoreNoLastMod Off CacheIgnoreCacheControl Off #mem cache CacheEnable mem / MCacheSize 262144 MCacheMaxStreamingBuffer 1048576 MCacheMaxObjectCount 13001 MCacheMaxObjectSize 4194304 MCacheMinObjectSize 1 The proxy is configured like this in apache2/sites-enabled: ProxyVia on ProxyPass /mm18 http://michiel.omroep.nl:8070/mm18 ProxyPassReverse /mm18 http://michiel.omroep.nl:8070/mm18 -- System Information: Debian Release: 3.0 APT prefers unstable APT policy: (1001, 'unstable') Architecture: i386 (i686) Kernel: Linux 2.6.9 Locale: LANG=C, LC_CTYPE=C (charmap=UTF-8) (ignored: LC_ALL set to en_US.utf8) Versions of packages apache2-common depends on: ii debconf 1.4.22 Debian configuration management sy ii debianutils 1.16 Miscellaneous utilities specific t ii libapr0 2.0.52-3 The Apache Portable Runtime ii libc6 2.3.2.ds1-11 GNU C Library: Shared libraries an ii libdb4.2 4.2.52-17 Berkeley v4.2 Database Libraries [ ii libexpat1 1.95.8-1 XML parsing C library - runtime li ii libldap2 2.1.23-1 OpenLDAP libraries ii libmagic1 4.06-1 File type determination library us ii libssl0.9.7 0.9.7b-1 SSL shared libraries ii mime-support 3.18-1 MIME files 'mime.types' & 'mailcap ii net-tools 1.60-4 The NET-3 networking toolkit ii openssl 0.9.7c-5 Secure Socket Layer (SSL) binary a ii ssl-cert 1.0-10 Simple debconf wrapper for openssl ii zlib1g 1:1.2.1.1-5 compression library - runtime -- no debconf information -- Michiel Meeuwissen mihxil' Mediacentrum 140 H'sum [] () +31 (0)35 6772979 nl_NL eo_XX en_US