Apache mod_disk_cache on a seperate drive

Posted by pavs on Server Fault See other posts from Server Fault or by pavs
Published on 2014-08-21T15:00:54Z Indexed on 2014/08/21 16:22 UTC
Read the original article Hit count: 132

Filed under:

how can I set Apache mod_disk_cache on a separate drive from where the OS/Apache is installed?

I have set up this on my apache2.conf:

<IfModule mod_cache_disk.c>

    # cache cleaning is done by htcacheclean, which can be configured in
    # /etc/default/apache2
    #
    # For further information, see the comments in that file,
    # /usr/share/doc/apache2/README.Debian, and the htcacheclean(8)
    # man page.

    # This path must be the same as the one in /etc/default/apache2
    CacheRoot /media/cacheHD

    # This will also cache local documents. It usually makes more sense to
    # put this into the configuration for just one virtual host.
    CacheEnable disk /


    # The result of CacheDirLevels * CacheDirLength must not be higher than
    # 20. Moreover, pay attention on file system limits. Some file systems
    # do not support more than a certain number of inodes and
    # subdirectories (e.g. 32000 for ext3)
    CacheDirLevels 2
    CacheDirLength 1

</IfModule>

and it doesn't seem to be caching anything at all. The drive itself is a freshly installed ssd drive formatted with ext4.

© Server Fault or respective owner

Related posts about apache-2.2