-
-
Save pborreli/801328 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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