aaPanel_Kern
Thank you for the clear explanation about the index.php. I understand it is hard to cater to all wordpress configurations, so I will only share my findings incase someone else have the same configuration as me. The configuration in question here is Settings -> Permalinks
, if you this custom structure /index.php/%year%/%monthnum%/%day%/%postname%/
(I presume any permalinks with index.php
in the middle will have this issue), you'll need to change the nginx configuration after deploying from aapanel.
The issue I had was getting 404 when trying to load any page other than the homepage, this is fixed by adding include pathinfo.conf;
to enable-php-81-wpfastcgi.conf
. Then you'll have another issue because of the index.php
in the url, your pages won't get cached so you'll have to remove index.php
from this line also:
if ($request_uri ~* "/wp-admin/|/xmlrpc.php|wp-.*.php|/feed/|index.php|sitemap(_index)?.xml") {
set $skip_cache 1;
}
But as Kern stated above, this won't work if your wordpress permalinks setting is different than mine.