Skip to content

Instantly share code, notes, and snippets.

@tecbot
Forked from jwage/gist:801326
Created January 29, 2011 01:11
Show Gist options
  • Save tecbot/801373 to your computer and use it in GitHub Desktop.
Save tecbot/801373 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 / {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/vhosts/sociallynotable.com/sociallynotable.com/web$fastcgi_script_name;
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