I want to use nginx for both Symfony2 sites and other software like phpMyAdmin.
I've read the nginx docs on setting up Symfony2 and came across this issue: http://www.webhostingtalk.com/showthread.php?p=6807475#post6807475
Can I just use security.limit_extensions=php
and then use something like this safely?
location \.php$ {
...
}
This blog seems to indicate this is a workaround for the security issue with file uploads: http://kaiwangchen.com/blog/2012/10/understand-the-cgi-fix_pathinfo-security-issue/
But most places with tutorials for setting up nginx recommend the old solutions of just restricting php to specific files. So I wasn't sure if this actually avoids the arbitrary code injection.
Or should I use try_files
?