Welcome! Log In Create A New Profile

Advanced

Re: nginx + php-fpm "modern configuration way"

Antonio P.P. Almeida
April 03, 2012 05:08AM
> Hello,
>
> Everyone knows there are many nginx tutorials out there and I would like
> to
> know what's the "modern way" when writing a php location block, I'm doing
> (nginx 1.1.:
>
> location ~ \.php$ {
> try_files $uri =404;
>
> include fastcgi_params;
> fastcgi_pass unix:/var/run/php5-fpm/www-data.sock;
> }

This is a "generic" way. This way you don't enumerate all the PHP scripts
that are to be executed. The above is just the Nginx translation of
"default" Apache way.

There are better ways IMHO. But they require more effort to put in place.

Also there's no need to use fcgi_split_pathinfo even if your app uses
PATHINFO, like Chive for example. You can get the same employing named
captures with regex based locations.

--appa

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

nginx + php-fpm "modern configuration way"

gpakosz April 03, 2012 04:52AM

Re: nginx + php-fpm "modern configuration way"

Edho Arief April 03, 2012 04:54AM

Re: nginx + php-fpm "modern configuration way"

gpakosz April 03, 2012 05:04AM

Re: nginx + php-fpm "modern configuration way"

Tiberius April 03, 2012 06:22AM

Re: nginx + php-fpm "modern configuration way"

gpakosz April 03, 2012 02:58PM

Re: nginx + php-fpm "modern configuration way"

locojohn April 03, 2012 05:05AM

Re: nginx + php-fpm "modern configuration way"

Antonio P.P. Almeida April 03, 2012 05:08AM

Re: nginx + php-fpm "modern configuration way"

locojohn April 03, 2012 05:12PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 290
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