apache caching not working

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have a webserver servicing the images and url for that webserver looks like
this:

http://backend-server.abc.com/mcs-stream-war/asset/streamAsset?id=e98a887b-2eb1-456d-ba18-d21a1b0b06cc

The above URL is basically an image.

Now, I want to front this webserver with a reverse proxy caching apache
webserver.  The reverse proxy part is workign good but it looks like the
caching is not working at all. I want to use disk based caching and my
config looks like this:

ProxyRequests off
ProxyPass        /mcs-stream-war/asset/       
http://backend-server.abc.com/mcs-stream-war/asset/
ProxyPassReverse /mcs-stream-war/asset/       
http://backend-server.abc.com/mcs-stream-war/asset/


CacheRoot   /opt/apache2.2.11-mcs-caching/diskcache-store
CacheEnable disk /
CacheDirLevels 2
CacheDirLength 1
CacheMaxFileSize 100000000
CacheIgnoreCacheControl On
CacheIgnoreNoLastMod On
CacheIgnoreNoLastMod On
CacheMaxExpire 604800
CacheIgnoreQueryString On

Here are my observations and issues:

1) when I hit the given reverse proxy apache server with this url:
http://reverse-proxywebserver.abc.com/mcs-stream-war/asset/streamAsset?id=e98a887b-2eb1-456d-ba18-d21a1b0b06cc,
I can see that I am being served the image as the reverse proxy webserver
gets connection to the backend resource 
http://backend-server.abc.com/mcs-stream-war/asset/  and serves the image

2) But the caching part is not working at all. Nothing is being created in
the caching directory at all.

Here are the debug error messages:


[Tue Jan 27 18:55:46 2009] [debug] mod_cache.c(131): Adding CACHE_SAVE
filter for /mcs-stream-war/asset/streamAsset
[Tue Jan 27 18:55:46 2009] [debug] mod_cache.c(138): Adding CACHE_REMOVE_URL
filter for /mcs-stream-war/asset/streamAsset
[Tue Jan 27 18:55:46 2009] [debug] mod_proxy_http.c(56): proxy: HTTP:
canonicalising URL //backend-server.abc.com/mcs-stream-war/asset/streamAsset
[Tue Jan 27 18:55:46 2009] [debug] proxy_util.c(1489): [client 10.52.34.94]
proxy: http: found worker
http://backend-server.abc.com/mcs-stream-war/asset/ for
http://backend-server.abc.com/mcs-stream-war/asset/streamAsset?id=e98a887b-2eb1-456d-ba18-d21a1b0b06cc
[Tue Jan 27 18:55:46 2009] [debug] mod_proxy.c(993): Running scheme http
handler (attempt 0)
[Tue Jan 27 18:55:46 2009] [debug] mod_proxy_http.c(1920): proxy: HTTP:
serving URL
http://backend-server.abc.com/mcs-stream-war/asset/streamAsset?id=e98a887b-2eb1-456d-ba18-d21a1b0b06cc
[Tue Jan 27 18:55:46 2009] [debug] proxy_util.c(1991): proxy: HTTP: has
acquired connection for (backend-server.abc.com)
[Tue Jan 27 18:55:46 2009] [debug] proxy_util.c(2047): proxy: connecting
http://backend-server.abc.com/mcs-stream-war/asset/streamAsset?id=e98a887b-2eb1-456d-ba18-d21a1b0b06cc
to backend-server.abc.com:80
[Tue Jan 27 18:55:46 2009] [debug] proxy_util.c(2145): proxy: connected
/mcs-stream-war/asset/streamAsset?id=e98a887b-2eb1-456d-ba18-d21a1b0b06cc to
backend-server.abc.com:80
[Tue Jan 27 18:55:46 2009] [debug] proxy_util.c(2300): proxy: HTTP: fam 2
socket created to connect to backend-server.abc.com
[Tue Jan 27 18:55:46 2009] [debug] proxy_util.c(2406): proxy: HTTP:
connection complete to 199.1.146.213:80 (backend-server.abc.com)
[Tue Jan 27 18:55:47 2009] [debug] mod_proxy_http.c(1703): proxy: start body
send
[Tue Jan 27 18:55:47 2009] [debug] mod_cache.c(639): cache: Caching url:
/mcs-stream-war/asset/streamAsset?id=e98a887b-2eb1-456d-ba18-d21a1b0b06cc
[Tue Jan 27 18:55:47 2009] [debug] mod_cache.c(645): cache: Removing
CACHE_REMOVE_URL filter.
[Tue Jan 27 18:55:47 2009] [debug] mod_cache.c(830): (13)Permission denied:
cache: store_headers failed
[Tue Jan 27 18:55:47 2009] [debug] mod_proxy_http.c(1796): proxy: end body
send
[Tue Jan 27 18:55:47 2009] [debug] proxy_util.c(2009): proxy: HTTP: has
released connection for (backend-server.abc.com)
[Tue Jan 27 18:55:47 2009] [debug] mod_cache.c(131): Adding CACHE_SAVE
filter for /favicon.ico
[Tue Jan 27 18:55:47 2009] [debug] mod_cache.c(138): Adding CACHE_REMOVE_URL
filter for /favicon.ico
[Tue Jan 27 18:55:47 2009] [error] [client 10.52.34.94] File does not exist:
/local/mnt/apache2.2.11-mcs-caching/htdocs/favicon.ico
[Tue Jan 27 18:57:08 2009] [debug] mod_cache.c(131): Adding CACHE_SAVE
filter for /mcs-stream-war/asset/streamAsset
[Tue Jan 27 18:57:08 2009] [debug] mod_cache.c(138): Adding CACHE_REMOVE_URL
filter for /mcs-stream-war/asset/streamAsset
[Tue Jan 27 18:57:08 2009] [debug] mod_proxy_http.c(56): proxy: HTTP:
canonicalising URL //backend-server.abc.com/mcs-stream-war/asset/streamAsset
[Tue Jan 27 18:57:08 2009] [debug] proxy_util.c(1489): [client 10.52.34.94]
proxy: http: found worker
http://backend-server.abc.com/mcs-stream-war/asset/ for
http://backend-server.abc.com/mcs-stream-war/asset/streamAsset?id=e98a887b-2eb1-456d-ba18-d21a1b0b06cc
[Tue Jan 27 18:57:08 2009] [debug] mod_proxy.c(993): Running scheme http
handler (attempt 0)
[Tue Jan 27 18:57:08 2009] [debug] mod_proxy_http.c(1920): proxy: HTTP:
serving URL
http://backend-server.abc.com/mcs-stream-war/asset/streamAsset?id=e98a887b-2eb1-456d-ba18-d21a1b0b06cc
[Tue Jan 27 18:57:08 2009] [debug] proxy_util.c(1991): proxy: HTTP: has
acquired connection for (backend-server.abc.com)
[Tue Jan 27 18:57:08 2009] [debug] proxy_util.c(2047): proxy: connecting
http://backend-server.abc.com/mcs-stream-war/asset/streamAsset?id=e98a887b-2eb1-456d-ba18-d21a1b0b06cc
to backend-server.abc.com:80
[Tue Jan 27 18:57:08 2009] [debug] proxy_util.c(2145): proxy: connected
/mcs-stream-war/asset/streamAsset?id=e98a887b-2eb1-456d-ba18-d21a1b0b06cc to
backend-server.abc.com:80
[Tue Jan 27 18:57:08 2009] [debug] proxy_util.c(2236): proxy: HTTP: backend
socket is disconnected.
[Tue Jan 27 18:57:08 2009] [debug] proxy_util.c(2300): proxy: HTTP: fam 2
socket created to connect to backend-server.abc.com
[Tue Jan 27 18:57:08 2009] [debug] proxy_util.c(2406): proxy: HTTP:
connection complete to 199.1.146.213:80 (backend-server.abc.com)
[Tue Jan 27 18:57:08 2009] [debug] mod_proxy_http.c(1800): proxy: header
only
[Tue Jan 27 18:57:08 2009] [debug] mod_cache.c(528): cache:
/mcs-stream-war/asset/streamAsset?id=e98a887b-2eb1-456d-ba18-d21a1b0b06cc
not cached. Reason: HTTP Status 304 Not Modified
[Tue Jan 27 18:57:08 2009] [debug] proxy_util.c(2009): proxy: HTTP: has
released connection for (backend-server.abc.com)



Please help me with this. My gut feeling is: I am missing some small
config..


-- 
View this message in context: http://www.nabble.com/apache-caching-not-working-tp21693092p21693092.html
Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.


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


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux