Last active
December 13, 2015 19:28
-
-
Save gsf/4962734 to your computer and use it in GitHub Desktop.
Nginx settings on aarseth
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
| server { | |
| listen 80; | |
| server_name aarseth; | |
| root /home/gsf/svn/waytohealth/meta/web; | |
| # For passing along to a static site | |
| location ^~ /a/ { | |
| alias /home/gsf/git/Apprenticeship; | |
| } | |
| # See http://wiki.nginx.org/Pitfalls#Passing_Uncontrolled_Requests_to_PHP | |
| # and set cgi.fix_pathinfo=0 in php.ini or something | |
| location ~ \.php$ { | |
| include fastcgi_params; | |
| fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
| fastcgi_pass unix:/run/php-fpm/php-fpm.sock; # or 127.0.0.1:9000; | |
| } | |
| location ~ ^/([^/]+) { | |
| try_files $uri /$1/index.php?$args; # send every non-file to its index.php | |
| } | |
| error_page 500 502 503 504 /50x.html; | |
| location = /50x.html { | |
| root /usr/share/nginx/html; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment