Protect against php files being send as static files

Ian Hobson hobson42 at gmail.com
Tue Mar 12 20:54:52 UTC 2019


Hi,

On 12/03/2019 08:53, Olaf van der Spek wrote:
> Ian Hobson Wrote:
>> http://forumm.nginx.org/read.php?2,88846,page 3
> 
> This link doesn't work..
Sorry - typo (made months ago)
https://forum.nginx.org/read.php?2,88845,page=3
> 
>>         try_files $uri =404;
>>         fastcgi_split_path_info ^(.+\.php)(/.+)$;
>>         include /etc/nginx/fastcgi_params;
>>         fastcgi_param SCRIPT_FILENAME
>> $document_root$fastcgi_script_name;
>>         fastcgi_pass  127.0.0.1:9000;
>>      }
>> }
> 
> Unix sockets are recommended over TCP AFAIK.
Yup - this config was a copy.paste job.
I have never understood why.

-- 
Ian Hobson


More information about the nginx mailing list