Created
March 6, 2014 20:28
-
-
Save andxyz/9398953 to your computer and use it in GitHub Desktop.
This file contains 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
# tips http://wiki.nginx.org/Pitfalls | |
# | |
server { | |
listen 80; | |
server_name www.andxyz.com; | |
rewrite ^ http://andxyz.com$request_uri? permanent; | |
} | |
server { | |
listen 80; | |
server_name andxyz.com linode.andxyz.com *.andxyz.com; | |
root /home/wwwandxyz/website/; | |
server_tokens off; | |
location / { | |
access_log off; | |
gzip on; | |
gzip_min_length 1000; | |
gzip_proxied expired no-cache no-store private auth; | |
gzip_types text/plain application/xml; | |
gzip_disable "MSIE [1-6]\."; | |
if (-f $request_filename) { | |
access_log off; | |
expires 24h; | |
break; | |
} | |
if (-f $request_filename.html) { | |
rewrite (.*) $1.html break; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment