Skip to content

Commit

Permalink
add upstream server in nginx config
Browse files Browse the repository at this point in the history
  • Loading branch information
glass-ships committed Aug 19, 2024
1 parent 04b669b commit beb077b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion deploy-config/nginx/envlocal.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
upstream livedata {
server django:8000;
}

server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
Expand All @@ -6,7 +10,7 @@ server {
client_max_body_size 0;

location / {
proxy_pass http://livedata:8000;
proxy_pass http://livedata;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
Expand Down

0 comments on commit beb077b

Please sign in to comment.