From 0c5c4af28b37ec257d85020aff71429f3b8bbb8c Mon Sep 17 00:00:00 2001 From: mxd Date: Sun, 12 May 2024 12:12:22 +0800 Subject: [PATCH] =?UTF-8?q?Nginx=E8=B4=9F=E8=BD=BD=E5=9D=87=E8=A1=A1?= =?UTF-8?q?=E7=A4=BA=E4=BE=8B=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nginx/upstream-nginx.conf | 47 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 nginx/upstream-nginx.conf diff --git a/nginx/upstream-nginx.conf b/nginx/upstream-nginx.conf new file mode 100644 index 0000000..500c722 --- /dev/null +++ b/nginx/upstream-nginx.conf @@ -0,0 +1,47 @@ +upstream django { + ip_hash; + server 127.0.0.1:22200; + server 127.0.0.1:22201; +} +server +{ + listen 80; + listen 443 ssl ; + server_name epg.mxdyeah.top; + root /mxdyeah/epg; + #DJANGO-SETTING-START + #Django 相关配置 + location /{ + include /www/server/nginx/nginx/conf/uwsgi_params; + uwsgi_pass django; + #uwsgi_pass 169.254.0.1:22200; + uwsgi_param X-Real-IP $remote_addr; + uwsgi_param X-Forwarded-For $proxy_add_x_forwarded_for; + uwsgi_param X-Forwarded-Proto $http_x_forwarded_proto; + + #proxy_pass http://django; + #proxy_set_header X-Real-IP $remote_addr; + #proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + #proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto; + } + + location /static { + alias /mxdyeah/epg/static; + #autoindex on; + } + + location /banip { + alias /mxdyeah/epg/banip; + index index.html; + #autoindex on; + } + + #location favicon.ico { + # alias /mxdyeah/epg/favcion.ico; + #} + + #DJANGO-SETTING-END + + access_log /dev/null; + error_log /epg/epg.mxdyeah.top.error.log; +}