Skip to content

Instantly share code, notes, and snippets.

@rkjha
Created November 12, 2014 10:21
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save rkjha/784e6654d6558dbaa29c to your computer and use it in GitHub Desktop.
A simple nginx config for sinatra app [with passenger app server]
server {
listen 80;
server_name www.example.com;
rewrite ^(.*) http://example.com$1 permanent;
}
server {
listen 80;
server_name example.com;
root /home/username/example.com/public;
passenger_enabled on;
# Cache static content
location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
expires 30d;
add_header Vary Accept-Encoding;
access_log off;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment