-
Notifications
You must be signed in to change notification settings - Fork 69
/
nginx.conf
55 lines (46 loc) · 1.22 KB
/
nginx.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
55
upstream hello_server {
server web:8008;
# server 35.195.198.74:80;
server 35.233.41.32:80;
}
server {
listen 80;
server_name localhost;
return 301 https://$host$request_uri;
}
server {
listen 443;
server_name localhost;
client_max_body_size 50M;
ssl on;
ssl_certificate /etc/letsencrypt/live/comixify.ii.pw.edu.pl/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/comixify.ii.pw.edu.pl/privkey.pem;
location / {
# everything is passed to Gunicorn
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_pass http://hello_server;
proxy_connect_timeout 300;
proxy_send_timeout 300;
proxy_read_timeout 300;
send_timeout 300;
}
location = / {
proxy_pass http://35.195.198.74:80$uri;
}
location ^~ /.well-known {
allow all;
root /data/letsencrypt/;
}
location /static/ {
alias /comixify/static/;
try_files $uri = @try_another2;
}
location /media/ {
alias /comixify/media/;
try_files $uri = @try_another2;
}
location @try_another2 {
proxy_pass http://35.233.41.32:80$uri;
}
}