Created
February 7, 2013 20:30
-
-
Save candidosales/4733904 to your computer and use it in GitHub Desktop.
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
upstream midiaexterna { | |
server unix:///home/ubuntu/midiaexterna/current/tmp/puma.sock; | |
} | |
server { | |
listen 80; | |
server_name 177.71.250.61; | |
keepalive_timeout 5; | |
root /home/ubuntu/midiaexterna/current/public; | |
access_log /home/ubuntu/log/nginx/nginx.access.log; | |
error_log /home/ubuntu/log/nginx/nginx.error.log info; | |
if (-f $document_root/maintenance.html) { | |
rewrite ^(.*)$ /maintenance.html last; | |
break; | |
} | |
location ~ ^/(assets)/ { | |
root /home/ubuntu/midiaexterna/current/public; | |
expires max; | |
add_header Cache-Control public; | |
} | |
location / { | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Host $http_host; | |
if (-f $request_filename) { | |
break; | |
} | |
if (-f $request_filename/index.html) { | |
rewrite (.*) $1/index.html break; | |
} | |
if (-f $request_filename.html) { | |
rewrite (.*) $1.html break; | |
} | |
if (!-f $request_filename) { | |
proxy_pass http://177.71.250.61; | |
break; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment