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.
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.
Share Improve this question asked May 31, 2020 at 11:39 FerimanFeriman 2892 silver badges9 bronze badges1 Answer
Reset to default 1I solved this issue by replacing
RewriteRule . /index.php [L]
with
RewriteRule ^(.*)$ /index.php/$1 [L]
in .htaccess file.