Welcome! Log In Create A New Profile

Advanced

Re: Check if php-file exists in chroot jail

Valentin V. Bartenev
March 21, 2012 12:16PM
On Wednesday 21 March 2012 18:05:38 maverick78 wrote:
> Hello!
>
> 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?
>

By setting proper root and permissions. If you get 404 here:

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

then /public/$uri isn't accessible to nginx or it doesn't exist. See error/debug
log for additional information.

wbr, Valentin V. Bartenev

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
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: 149
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