【发布时间】:2020-10-30 22:13:06
【问题描述】:
有人可以帮我解决这个问题吗?
我在使用 proxypass 的主机中使用 gunicorn 使用烧瓶应用程序配置 Nginx。访问该路径时出现 404 Page not found 错误。
这是我的 Nginx 配置:
server {
listen 80;
server_name xxxx.com www.xxxx.com;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl;
server_name xxxx.com www.xxxx.com;
ssl_certificate xxxxxx;
ssl_certificate_key xxxxxx;
location / {
include proxy_params;
proxy_pass http://unix:/xxxx/app.sock;
}
location = /dev{
proxy_pass http://unix:/xxxx/app.sock;
include proxy_params;
}
}
如果我在 home(xxxx.com) 中配置并访问其工作的主目录,但是当我尝试在 path(xxxx.com/dev) 中配置并访问此 http://xxxxx.com/dev 时出现 404 错误.我的实际应用在 /home/path/to/folder/app.sock
请帮帮我。
谢谢。
【问题讨论】: