-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsignup.conf.nginx
59 lines (48 loc) · 1.41 KB
/
signup.conf.nginx
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
ssl_session_cache shared:SSL:16m;
ssl_session_timeout 10m;
upstream green_unicorn {
#Port you configured green unicorn to use
server unix:/var/www/cdc-signup/var/run/gunicorn.sock fail_timeout=1;
}
server {
#Redirects everything to https
listen 80;
rewrite ^(.*) https://$host$1 permanent;
}
server {
listen 443;
ssl on;
server_name signup.iseage.org;
add_header Strict-Transport-Security "max-age=5184000; includeSubdomains";
#Be sure to create these files in /etc/nginx/ssl/
ssl_certificate ssl/iseage.org.pem;
ssl_certificate_key ssl/iseage.org.key;
client_max_body_size 4G;
keepalive_timeout 5;
send_timeout 600; # To allow slow mass emails
#Edit this to be the path where you installed signup
root /var/www/cdc-signup;
location = /robots.txt {
return 301 /static/robots.txt;
}
location = /favicon.ico {
return 404;
log_not_found off;
access_log off;
}
location ^~ /static/ {
gzip_static on;
expires max;
}
location ^~ /static/admin/ {
root /var/www/cdc-signup/lib/python2.7/site-packages/django/contrib/admin/;
gzip_static on;
expires max;
}
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://green_unicorn;
}
}