I'm trying to set up FastCGI caching for my wordpress website running on nginx and using PHP-FPM. Currently, when I try to visit the site, all I get is a bland "Access denied.
".
If I comment out fastcgi_cache drm_custom_cache
from my nginx server block, everything works just fine.
tail /var/log/nginx/error.log
first said:
FastCGI sent in stderr: "Access to the script '/var/www/domain.tld/html' has been denied (see security.limit_extensions)" while reading response header from upstream, client: /ip masked/, server: domain.tld, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm/php-fpm.sock:", host: "domain.tld"
In response to the error, I tried adding security.limit_extensions =
to /etc/php-fpm.d/www.conf
.
Now, the error log states:
FastCGI sent in stderr: "PHP message: PHP Warning: Unknown: failed to open stream: Success in Unknown on line 0 Unable to open primary script: /var/www/domain.tld/html (Permission denied)" while reading response header from upstream, client: /ip masked/, server: domain.tld, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm/php-fpm.sock:", host: "domain.tld"
Help appreciated.
fastcgi_cache drm_custom_cache
in the server block./dev/shm/nginx/
. I also tried/var/cache/nginx/
I think.