From: Julien Moutinho Date: Wed, 22 Oct 2014 01:52:44 +0000 (+0200) Subject: Correction : nginx : if is evil. X-Git-Url: https://git.cyclocoop.org/?p=lhc%2Fateliers.git;a=commitdiff_plain;h=e4d774cdced3a4f97cf15d3ab89eec5a7af8c275 Correction : nginx : if is evil. --- diff --git a/etc/nginx/site.d/cyclo-letabli/site.conf b/etc/nginx/site.d/cyclo-letabli/site.conf index f0a2f14..a06f71b 100644 --- a/etc/nginx/site.d/cyclo-letabli/site.conf +++ b/etc/nginx/site.d/cyclo-letabli/site.conf @@ -50,10 +50,9 @@ location ~ \.php(|/.+)$ { fastcgi_pass_header Cookie; fastcgi_pass_header Set-Cookie; fastcgi_split_path_info ^(.+\.php)(/.+)$; - if (!-f $document_root$fastcgi_script_name) { - # This is a robust solution for path info security issue and works with "cgi.fix_pathinfo = 1" in /etc/php.ini (default) - return 404; - } + try_files $fastcgi_script_name =404; + # Check for path info security issue + fastcgi_pass unix:/run/php5/fpm/letabli; }