Skip to content

Instantly share code, notes, and snippets.

@partydrone
Created August 5, 2011 21:55
Show Gist options
  • Save partydrone/1128619 to your computer and use it in GitHub Desktop.
Save partydrone/1128619 to your computer and use it in GitHub Desktop.
nginx 1.0 example vhost config file
server {
server_name rapidturtle.com;
rewrite ^ $scheme://www.rapidturtle.com$request_uri? permanent;
}
server {
server_name www.rapidturtle.com;
root /home/deploy/com.rapidturtle.www/current/public;
access_log logs/com.rapidturtle.www.access.log;
error_log logs/com.rapidturtle.www.error.log error;
passenger_enabled on;
rails_env staging; # only if not deploying to public
# Set expires max on static file types
location ~ ^/(assets|system)/ {
gzip_static on; # to serve pre-gzipped version
expires max;
add_header Cache-Control public;
}
# opt-in to the future
add_header "X-UA-Compatible" "IE=Edge,chrome=1";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment