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; +}