Check if php-file exists in chroot jail

maverick78 nginx-forum at
Wed Mar 21 14:05:38 UTC 2012


I configured php-fpm to use build-in chroot. Everything works fine, but
there ist a problem when I try to check if a php-file exists.

server {
location ~ \.php$ {
root /public;
try_files $uri =404;

In this case, I alsways get 404 not found for php-files.

When I comment out try_files, the php-files are processed.

Is there a way of proper configuration in this case? How can I check if
a php-file really exists before I pass it to php-fpm?

Posted at Nginx Forum:,224182,224182#msg-224182

More information about the nginx mailing list