blob: 5648d55b290ce75beb2bab33c15d144a77589c51 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
upstream unicorn {
server unix:/tmp/unicorn.my_app_name.sock fail_timeout=0;
}
server {
listen 80 default deferred;
# server_name the_name_of_my_server;
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;
}
# Same as above but with SSL & SPDY
# server {
# listen 443 ssl spdy default_server;
# server_name example.com;
# ssl_certificate /etc/ssl/certs/my.ssl.crt;
# ssl_certificate_key /etc/ssl/private/my.ssl.key;
# 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;
# }
|