添加服务器配置文件

This commit is contained in:
zhengxinonly
2022-03-30 20:54:30 +08:00
parent 1e34ef339a
commit 8760f21b03
4 changed files with 44 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
server {
listen 80 default_server;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
location / {
proxy_pass http://127.0.0.1:8000; # 转发的地址,即Gunicorn运行的地址
proxy_redirect off;
proxy_set_header Host $host;
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 $scheme;
}
}