March 21, 2012 01:10PM
Thanks for your reply.

I got stuck with finding out the proper settings.

My files are located in /www/example.com/public. This is set as document root in nginx server block.

In my pool of php-fpm I set a chroot path.

chroot = /www/example.com

That's why I have to set another path to document_root in my location block for php-files.

root /public;

With these settings all my php-files are delivered by php-fpm. Nothing to complain about. So, permissions and paths sem to be correct.

For security reasons I want to check, if the called file with php-extension really exists. For this purpose I want to use try_files. But when I put try_files $uri =404; in the php location block, I always get an 404 error for php-files.

I think nginx cant find the right path because of the chroot setting in php-fpm. Is the a way to get around this?
Subject Author Posted

Check if php-file exists in chroot jail

maverick78 March 21, 2012 10:05AM

Re: Check if php-file exists in chroot jail

Valentin V. Bartenev March 21, 2012 12:16PM

Re: Check if php-file exists in chroot jail

maverick78 March 21, 2012 01:10PM

Re: Check if php-file exists in chroot jail

Valentin V. Bartenev March 21, 2012 03:00PM

Re: Check if php-file exists in chroot jail

Francis Daly March 21, 2012 03:02PM

Re: Check if php-file exists in chroot jail

maverick78 March 21, 2012 05:22PM

Re: Check if php-file exists in chroot jail

Francis Daly March 21, 2012 07:24PM

Re: Check if php-file exists in chroot jail

maverick78 March 22, 2012 05:24AM

Re: Check if php-file exists in chroot jail

Francis Daly March 22, 2012 02:48PM

Re: Check if php-file exists in chroot jail

maverick78 March 22, 2012 04:17PM

Re: Check if php-file exists in chroot jail

Volodymyr Kostyrko March 24, 2012 12:32PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 137
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready