[deleted] you have two different location
blocks handling PHP files. That doesn't seem correct (location ~* ^/forum/(.*)\.php$
and location ~ \.php$
)
Is the error message still the same after your various changes ?
EDIT: for reference below is a working configuration I'm using. It doesn't use a public
folder (so no alias, but need to follow the "customizing paths" instructions of Flarum
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location /forum/ {
try_files $uri $uri/ /forum/index.php?$query_string;
}
location ~* ^/forum/(composer\.(json|lock)|config\.php|flarum|storage|vendor|workbench) {
deny all;
return 404;
}