Created
November 4, 2013 14:35
-
-
Save kaspergrubbe/7303354 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
| # create /etc/nginx/sites-available/wupwup.dk | |
| upstream unicorn { | |
| server 127.0.0.1:8000; # unicorn is set to listen on port 8000 | |
| } | |
| server { | |
| listen 80; | |
| server_name wupwup.dk; | |
| location / { | |
| proxy_pass http://unicorn; | |
| proxy_redirect off; | |
| proxy_set_header Host \$host; | |
| proxy_set_header X-Real-IP \$remote_addr; | |
| proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for; | |
| } | |
| } | |
| server { | |
| listen 80; | |
| server_name assets.wupwup.dk; | |
| # server_name ~^assets%d.your-host.com; | |
| # rails: config.action_controller.asset_host = "http://assets%d.yourhost.com" | |
| location ~ /assets/ { | |
| root /home/deployer/apps/wupwup/shared; | |
| gzip_static on; # to serve pre-gzipped version | |
| expires max; | |
| add_header Cache-Control public; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment