From 93de9728efb0e689ce413e980dae685ac0b4b9c3 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Date: Fri, 4 Nov 2011 20:48:16 +0100 Subject: Added my nginx/unicorn configuration --- nginx_unicorn/nginx.server.conf | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 nginx_unicorn/nginx.server.conf (limited to 'nginx_unicorn/nginx.server.conf') diff --git a/nginx_unicorn/nginx.server.conf b/nginx_unicorn/nginx.server.conf new file mode 100644 index 0000000..65cdb21 --- /dev/null +++ b/nginx_unicorn/nginx.server.conf @@ -0,0 +1,22 @@ +upstream unicorn { + server unix:/tmp/unicorn.rem.sock fail_timeout=0; +} + +server { + listen 80 default deferred; + # server_name the_name_of_my_server; + + # TODO: Change it at your own needs + root /my/app/public/root; + try_files $uri/index.html $uri @unicorn; + location @unicorn { + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header Host $http_host; + proxy_redirect off; + proxy_pass http://unicorn; + } + + error_page 500 502 503 504 /500.html; + client_max_body_size 4G; + keepalive_timeout 10; +} -- cgit v1.2.3