-
Notifications
You must be signed in to change notification settings - Fork 0
/
web_nginx.prod.conf
51 lines (37 loc) · 1.01 KB
/
web_nginx.prod.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
server {
listen 80;
listen [::]:80;
server_name ${SERVER_NAME};
server_tokens off;
location /.well-known/acme-challenge/ {
root /var/www/certbot;
}
location / {
return 301 https://${SERVER_NAME}$request_uri;
}
}
server {
listen 443 default_server ssl;
listen [::]:443 ssl;
client_max_body_size 256M;
server_name ${SERVER_NAME};
gzip on;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss
text/javascript;
gzip_proxied any;
gzip_min_length 1000;
gzip_disable "msie6";
ssl_certificate /etc/nginx/ssl/live/${SERVER_NAME}/fullchain.pem;
ssl_certificate_key /etc/nginx/ssl/live/${SERVER_NAME}/privkey.pem;
location / {
proxy_pass http://web:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
location /static/ {
alias /code/static/;
}
location /media/ {
alias /code/media/;
}
}