Skip to content

Instantly share code, notes, and snippets.

@ipedrazas
Created April 29, 2012 13:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ipedrazas/2550426 to your computer and use it in GitHub Desktop.
Save ipedrazas/2550426 to your computer and use it in GitHub Desktop.
Nginx Server config
server {
listen 80 default;
root /var/www/blibb/php/public;
index index.php;
location /user/ {
try_files $uri $uri/ /main.php?id=$uri&$args;
}
location / {
try_files $uri $uri/ $uri.php?$args;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
include /etc/nginx/fastcgi_params;
}
location ~ \.(aspx|jsp|cgi)$ {
return 410;
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
expires max;
log_not_found off;
}
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