-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.https.conf
54 lines (43 loc) · 1.59 KB
/
nginx.https.conf
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
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
# the upstream component nginx needs to connect to
upstream django {
server app:8000; # for a web port socket (we'll use this first)
}
# Extra
proxy_read_timeout 600;
uwsgi_read_timeout 600;
server {
client_max_body_size 25M;
listen 80;
server_name askcos;
rewrite ^ https://$http_host$request_uri? permanent;
server_tokens off;
}
# configuration of the server
server {
client_max_body_size 25M;
listen 443 http2 ssl;
listen [::]:443 http2 ssl;
ssl_certificate /etc/ssl/certs/askcos.ssl.cert;
ssl_certificate_key /etc/ssl/private/askcos.ssl.key;
server_tokens off;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-CAMELLIA256-SHA:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-SEED-SHA:DHE-RSA-CAMELLIA128-SHA:HIGH:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS';
ssl_prefer_server_ciphers on;
proxy_set_header X-Forwarded-For $remote_addr;
server_name askcos;
charset utf-8;
location /static/ {
autoindex on;
alias /static/;
}
location / {
uwsgi_pass django;
include /etc/nginx/uwsgi_params;
}
}
}