Skip to content

Instantly share code, notes, and snippets.

@gsf
Last active December 13, 2015 19:28
Show Gist options
  • Select an option

  • Save gsf/4962734 to your computer and use it in GitHub Desktop.

Select an option

Save gsf/4962734 to your computer and use it in GitHub Desktop.
Nginx settings on aarseth
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