我在我的 django (gunicorn) 应用程序前面运行 nginx。我想打电话给:
api.mydomain.com
被重定向到:
本地主机:8080/api
我现在有了这个,但这显然不起作用:
server {
listen 80;
server_name api.mydomain.com;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
location / {
index index.html index.htm;
proxy_pass http://localhost:8080/api;
}
}
谢谢!