"No such file or directory" when using mod_cache

2.1k views Asked by At

I am trying to configure mod_cache to cache all web pages. I get this header every time I hit refresh

X-Cache-Detail:""cache miss: attempting entity save" from 1webwb1"

I turn on debug logging and I get this for every resource that I am trying to cache:

[Tue Jun 23 11:16:49.223441 2015] [cache:debug] [pid 31903] mod_cache.c(1326): [client 172.31.217.72:65082] AH00769: cache: Caching url: /resource?param=x, referer: http://mywebsite/
[Tue Jun 23 11:16:49.223453 2015] [cache:debug] [pid 31903] mod_cache.c(1332): [client 172.31.217.72:65082] AH00770: cache: Removing CACHE_REMOVE_URL filter., referer: http://mywebsite/
[Tue Jun 23 11:16:49.223497 2015] [cache:debug] [pid 31903] mod_cache.c(700): (2)No such file or directory: [client 172.31.217.72:65082] AH00765: cache: Cache provider's store_body failed!, referer: http://mywebsite/

I could post my httpd.conf, but honestly I used (almost) the exact same configuration on a different box and it worked.

Is there something on the box or httpd installation that could be causing this error? I am using httpd-2.4.6-18.0.1.el7_0.x86_64 on both boxes.

1

There are 1 answers

0
Codo On

We've encountered the same issue. We have fixed it by changing the cache directory from /var/tmp/apache to /var/cache/apache and properly setting the permissions:

our_apache.conf:

CacheRoot /var/cache/apache

As root user:

# mkdir /var/cache/apache
# chown apache:apache /var/cache/apache
# chmod 0700 /var/cache/apache

For some reason, the permissions on /var/tmp seem to be a problem:

# ls -ld /var/tmp
drwxrwxrwt. 8 root root 4096 Mar 14 10:30 /var/tmp