Page not found if mod_cache_disk is active


I set in Apache the mod_cache_disk module, but I’m getting 404 page not found error on every page and posts. I’m using WordPress Multisite on Debian 10 server with PHP FPM 7.4.

I set this below in apache2.conf file:

<IfModule mod_cache.c>
    CacheQuickHandler off

    CacheIgnoreNoLastMod On
    CacheDefaultExpire 7200

    CacheIgnoreCacheControl On
    CacheLastModifiedFactor 0.5
    CacheIgnoreHeaders Set-Cookie Cookie
    CacheHeader on
    CacheLock on
    CacheDisable /wp-admin
    CacheDisable /wp-login.php
    CacheDisable /wp-cron.php

    SetOutputFilter CACHE
    AddOutputFilterByType DEFLATE text/html text/plain text/css application/javascript application/rss+xml text/xml image/svg+xml

    <IfModule mod_cache_disk.c>
        CacheRoot /mnt/cache
        CacheEnable disk /
        CacheDirLevels 2
        CacheDirLength 1
        CacheMaxFileSize 100000000

Everything is working fine if I delete these lines from the configuration file.

How can I fix this issue? I would like to use mod_cache_disk with WordPress, it makes it at least 35x faster.

, , Feriman 3 years 2020-05-31T07:10:41-05:00 0 Answers 97 views 0

Leave an answer