mirror of
https://github.com/maciej3031/comixify.git
synced 2026-03-11 08:54:35 +00:00
Add LB to nginx
This commit is contained in:
parent
06b2eac567
commit
6d11f74224
1 changed files with 15 additions and 1 deletions
16
nginx.conf
16
nginx.conf
|
|
@ -1,5 +1,7 @@
|
|||
upstream hello_server {
|
||||
server web:8008;
|
||||
# server 35.195.198.74:80;
|
||||
server 35.233.41.32:80;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -20,22 +22,34 @@ server {
|
|||
# everything is passed to Gunicorn
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Host $host;
|
||||
proxy_redirect off;
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue