Skip to content

Instantly share code, notes, and snippets.

@foxweb
Created November 22, 2011 14:38
Show Gist options
  • Save foxweb/1385802 to your computer and use it in GitHub Desktop.
Save foxweb/1385802 to your computer and use it in GitHub Desktop.
server {
listen 3000;
server_name kurepin.com;
root /mnt/data/www/foxweb/sites/kurepin.com;
index index.php index.htm index.htm;
if (!-e $request_filename) {
rewrite ^/qr$ / last;
break;
}
location ~ .php$ {
fastcgi_pass fpm;
fastcgi_index index.php;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~* ^.+.(js|css|png|jpg|jpeg|gif|ico)$ {
access_log off;
expires max;
}
## Disable viewing .htaccess & .htpassword
location ~ /\.ht {
deny all;
}
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment