httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oscar Leonor <o...@tid.es>
Subject [users@httpd] reverse proxy with cache
Date Wed, 19 May 2004 13:39:17 GMT

Hi all,

I have found a problem configuring Apache/2.0.49 as a reverse proxy with 
cache enabled. My configuration is the following:

ProxyVia On
ProxyRequests Off
ProxyPass /app1/ http://justine2.hi.inet/appl_1/
ProxyPassReverse /app1/ http://justine2.hi.inet/appl_1/

CacheRoot "/cacheroot"
CacheEnable disk /
CacheSize 100000
CacheLastModifiedFactor 0.1

The issue is that the proxy seems to cache the images but not text/html 
documents and it still reloads them  from the web server even when they 
are already cached.  The logs says the following:

[Wed May 19 15:26:53 2004] [info] disk_cache: Serving Cached URL 
linuxdes/app1/feather.gif?
[Wed May 19 15:26:53 2004] [info] disk_cache: Served headers for URL 
linuxdes/app1/feather.gif?


Just for your information, maybe it's also useful to take a look to the 
HTTP request from the client and also the answers, one is from the web 
server (the text/html document) and the other from the proxy (the gif 
image):

GET /app1/ HTTP/1.1
Host: linuxdes:1700
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) 
Gecko/20030624 Netscape/7.1
Accept: 
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,*/*;q=0.1
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive

HTTP/1.1 200 OK
Date: Wed, 19 May 2004 13:26:53 GMT
Server: Apache/2.0.40 (Red Hat Linux)
Last-Modified: Wed, 19 May 2004 10:14:48 GMT
ETag: "ea87d-107-54021600"
Accept-Ranges: bytes
Content-Length: 263
Content-Type: text/html; charset=ISO-8859-1
X-Pad: avoid browser bug
Via: 1.1 linuxdes:1700

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <title>APPL_1</title>
</head>
<body>
<h1>Esta es la aplicacin 1</h1>
<br>
<img src="feather.gif" title="" alt="feather"
 style="width: 248px; height: 70px;"><br>
<br>
</body>
</html>

GET /app1/feather.gif HTTP/1.1
Host: linuxdes:1700
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) 
Gecko/20030624 Netscape/7.1
Accept: video/x-mng,image/png,image/jpeg,image/gif;q=0.2,*/*;q=0.1
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://linuxdes:1700/app1/

HTTP/1.1 200 OK
Date: Wed, 19 May 2004 13:26:53 GMT
Server: Apache/2.0.49 (Unix)
ETag: "ea83a-1947-4d922300"
Accept-Ranges: bytes
Via: 1.1 linuxdes:1700
Last-Modified: Wed, 19 May 2004 10:13:00 GMT
Content-Length: 6471
Content-Type: image/gif
Age: 680
Keep-Alive: timeout=15, max=99
Connection: Keep-Alive

GIF89aø


Do you have an idea about what I'm doing wrong in my configuration? Why 
text/html pages are not cached?


Many thanks and best regards,
Oscar.






---------------------------------------------------------------------
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


Mime
View raw message