Windwos下Apache的缓存设置

        1、打开httpd.conf,找到以下几个Module并将其启用(如果没有,可以自行添加)
              mod_proxy.so(module_proxy)
              mod_proxy_http.so(module_proxy_http)
              mod_cache.so(module_cache)
              mod_disk_cache.so(module_disk_cache) #基于硬盘文件缓存
       

         2、参考以下VirtualHost段,进行设置:
      #基于硬盘

               <VirtualHost *:80>  
                  ServerName bbs.abcd.cn
                  ProxyPass /  http://bbs.abcd.cn/
                  ProxyPassReverse /  http://bbs.abcd.cn/
                  CacheRoot "d:/apache_cache/"
                  #CacheEnable disk /images/    #缓存指定的目录
       CacheEnable disk /   #缓存所有目录

                  CacheDirLevels 2
                  CacheDirLength 1
      </VirtualHost>  

               基于内存的设置没有测试成功,就不复制出来了。

原文地址:https://www.cnblogs.com/JayK/p/3207749.html