Skip to content

Instantly share code, notes, and snippets.

@eyecatchup
Created January 25, 2014 05:43
Show Gist options
  • Save eyecatchup/8612347 to your computer and use it in GitHub Desktop.
Save eyecatchup/8612347 to your computer and use it in GitHub Desktop.
# for ngxin version 1.0.4+
server {
server_name vanilla.localhost;
root /var/www/vanilla;
# cleaner logs
#
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
log_not_found off;
access_log off;
}
# maybe deny access to internal files?
#
#location ~ /(library|locales|plugins) {
# deny all;
#}
# forum controller
#
location / {
try_files $uri $uri/ /index.php$request_uri;
}
# fastcgi (php-fpm) php hanler
#
location ~ \.php {
include fastcgi_params;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass 127.0.0.1:9000;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment