-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnginx
47 lines (37 loc) · 1.48 KB
/
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
server {
listen 80;
rewrite ^(.*) https://$host$1 permanent;
}
server {
listen emergencypetmatcher:443;
ssl on;
ssl_certificate /etc/ssl/certs/ssl-bundle.crt;
ssl_certificate_key /etc/nginx/emergencypetmatcher.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
#Disables all weak ciphers
ssl_ciphers "ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4";
ssl_prefer_server_ciphers on;
add_header Strict-Transport-Security max-age=31536000;
server_name emergencypetmatcher.com;
access_log /home/ubuntu/epm/project/logs/nginx_access.log;
error_log /home/ubuntu/epm/project/logs/nginx_error.log;
location / {
if (-f /usr/share/nginx/html/maintenance.html){
return 503;
}
#auth_basic "Restricted";
#auth_basic_user_file htpasswd_file;
proxy_pass http://gunicorn;
include /etc/nginx/proxy_params;
}
error_page 503 @maintenance;
location @maintenance {
rewrite ^(.*)$ /maintenance.html break;
}
location /media/ {
root /home/ubuntu/epm/;
}
location /static/ {
root /home/ubuntu/epm/deployment;
}
}