Created
June 23, 2016 09:53
-
-
Save oak-tree/953f2ed75554be3689c41ab4c7a20f93 to your computer and use it in GitHub Desktop.
nginx + php configration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| location ~ [^/]\.php(/|$) { | |
| fastcgi_split_path_info ^(.+?\.php)(/.*)$; | |
| if (!-f $document_root$fastcgi_script_name) { | |
| return 404; | |
| } | |
| # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini | |
| include fastcgi_params; | |
| # | |
| # # With php5-cgi alone: | |
| # fastcgi_pass 127.0.0.1:9000; | |
| # # With php5-fpm: | |
| fastcgi_pass unix:/var/run/php5-fpm.sock; | |
| fastcgi_index index.php; | |
| fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment