Last active
October 20, 2015 05:17
-
-
Save phamonyut/726e5913d27f6b84f295 to your computer and use it in GitHub Desktop.
example ngnix
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
# /etc/nginx/sites-available/default | |
upstream symbolet { | |
server unix:/tmp/unicorn.<your_unicorn_sock>.sock fail_timeout=0; | |
} | |
server { | |
server_name symbolet.com www.symbolet.com; | |
listen 80; | |
root /opt/www/symbolet.com/current/public; | |
try_files $uri/system/maintenance.html $uri/index.html $uri @symbolet; | |
location @symbolet { | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Proto $scheme; | |
proxy_set_header Host $http_host; | |
proxy_redirect off; | |
proxy_pass http://symbolet; | |
} | |
location ^~ /assets/ { | |
gzip_static on; | |
expires max; | |
add_header Cache-Control public; | |
add_header Access-Control-Allow-Origin *; | |
} | |
error_page 500 502 503 504 /500.html; | |
client_max_body_size 4G; | |
keepalive_timeout 10; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment