简体   繁体   中英

How do I get Apache mod_cache to cache?

I've gotten Apache mod_cache to work as intended on a Windows server running Apache 2.2, but I'm having trouble getting it running on a Linux cpanel server to which I have root access.

Here's what I know:

1) mod_cache and mod_disk_cache are both compiled into Apache (confirmed with "httpd -l")

2) My httpd.conf is configured like this CacheRoot /home/accountname/apache-cacheroot CacheEnable disk /

3) I've restarted Apache after all configuration changes

4) I know that section of the httpd.conf is being processed (I put some unrelated commands in there to debug.)

5) The file I request displays the current time via php, and it does not change on subsequent requests.

...it does not change on subsequent requests

It sounds like your caching is working. If it did change on every request, then the request is being served by PHP instead of Apache's cache.

Did you try enabling the modules with a2en cache and a2en disk_cache ?

Do not forget to restart the server after doing this.

根据您将CacheRoot设置为什么,您可能需要更改权限以将权限设置为777。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM