-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathnginx.conf.template
55 lines (42 loc) · 1.17 KB
/
nginx.conf.template
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
upstream django {
server web:8000;
}
server {
listen 443 http2 ssl;
server_name localhost <your_domain.com>;
client_max_body_size 100M;
proxy_read_timeout 30m;
proxy_send_timeout 30m;
ssl_certificate /etc/ssl/certs/cert.pem;
ssl_certificate_key /etc/ssl/private/server.key;
ssl on;
ssl_session_cache builtin:1000 shared:SSL:10m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4;
ssl_prefer_server_ciphers on;
location /static/ {
alias /ipl/static/;
}
location /media/ {
alias /ipl/media/;
}
location /webcam-test/ {
alias /ipl/webcam/test/;
}
location /reports/ {
alias /ipl/reports/;
}
location / {
allow all;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-Cluster-Client-Ip $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://django;
}
}
server {
listen 80;
server_name localhost <your_domain.com>;
return 301 https://$host$request_uri;
}