Created
December 14, 2010 11:59
-
-
Save minhajuddin/740325 to your computer and use it in GitHub Desktop.
nginx configuration file for unicorn
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
| upstream foobar_server { | |
| # This is the socket we configured in unicorn.rb | |
| server unix:/home/ubuntu/apps/foobar/tmp/sockets/unicorn.sock fail_timeout=0; | |
| } | |
| server { | |
| listen 80; | |
| server_name *.foobar.com; | |
| root /home/ubuntu/apps/foobar/public; | |
| location / { | |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
| proxy_set_header Host $http_host; | |
| proxy_redirect off; | |
| if (!-f $request_filename) { | |
| proxy_pass http://foobar_server; | |
| break; | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment