Created
August 25, 2016 18:48
-
-
Save belinskidima/93691da4f60b6ca611b26d0047e8a458 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
worker_processes 1; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
#passenger_root /home/airwall/.rvm/gems/ruby-2.3.1/gems/passenger-5.0.30; | |
#passenger_ruby /home/airwall/.rvm/gems/ruby-2.3.1/wrappers/ruby; | |
include mime.types; | |
default_type application/octet-stream; | |
sendfile on; | |
keepalive_timeout 65; | |
gzip on; | |
upstream unicorn { | |
server unix:/tmp/unicorn.stackowf.sock fail_timeout=0s; | |
} | |
server { | |
listen 80; | |
server_name 46.101.194.216; | |
root /home/airwall/stackowf/current/public; | |
#passenger_enabled on; | |
client_max_body_size 20M; | |
location ^~ /assets/ { | |
gzip_static on; | |
expires max; | |
add_header Cache-Control public; | |
} | |
try_files $uri/index.html $uri @unicorn; | |
location @unicorn { | |
proxy_set_header X-Forwared-For $proxy_add_x_forwarded_for; | |
proxy_set_header Host $http_host; | |
proxy_redirect off; | |
proxy_pass http://unicorn; | |
} | |
location /cable { | |
proxy_pass http://unicorn/cable; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade websocket; | |
proxy_set_header Connection Upgrade; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
} | |
error_page 500 502 503 504 /50x.html; | |
location = /50x.html { | |
root html; | |
} | |
} | |
# HTTPS server | |
# | |
#server { | |
# listen 443 ssl; | |
# server_name localhost; | |
# ssl_certificate cert.pem; | |
# ssl_certificate_key cert.key; | |
# ssl_session_cache shared:SSL:1m; | |
# ssl_session_timeout 5m; | |
# ssl_ciphers HIGH:!aNULL:!MD5; | |
# ssl_prefer_server_ciphers on; | |
# location / { | |
# root html; | |
# index index.html index.htm; | |
# } | |
#} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment