Created
November 12, 2014 10:21
-
-
Save rkjha/784e6654d6558dbaa29c to your computer and use it in GitHub Desktop.
A simple nginx config for sinatra app [with passenger app server]
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
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