Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@pborreli
Forked from jwage/gist:801326
Created January 29, 2011 00:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pborreli/801328 to your computer and use it in GitHub Desktop.
Save pborreli/801328 to your computer and use it in GitHub Desktop.
server {
expires 1M;
listen 80;
root /var/www/vhosts/sociallynotable.com/socially-notable/web;
index index.php;
if ($host ~* ^www.(.*)) {
set $remove_www $1;
rewrite ^(.*)$ http://$remove_www$1 permanent;
}
server_name sociallynotable.com *.sociallynotable.com;
location ~* ^.+\.(ico|ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css|rss|atom|js|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
if (-f $request_filename) {
expires max;
}
}
#location / {
# proxy_pass http://sociallynotable.com:8080;
#}
location / {
set $script $uri;
set $path_info "";
if ($uri ~ "^(.+\.php)(/.+)") {
set $script $1;
set $path_info $2;
}
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/vhosts/sociallynotable.com/sociallynotable.com/web$script;
fastcgi_param PATH_INFO $path_info;
include fastcgi_params;
fastcgi_intercept_errors on;
fastcgi_hide_header "X-Powered-By";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment