0

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
    </IfModule>
</IfModule>

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.

0

I solved this issue by replacing

RewriteRule . /index.php [L]

with

RewriteRule ^(.*)$ /index.php/$1 [L]

in .htaccess file.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.