小编Aja*_*mac的帖子

Nginx 看不到 unix 套接字

更新:我看到了与 /tmp 目录相关的问题,还有一条评论提到将套接字移出 /home 以及。它没有解决问题。

(帖子底部的其他更新)

我在 azure 上有一个ubuntu 16.04 vm我正在使用uwsgi作为服务器和nginx作为反向代理来托管烧瓶应用程序,遵循本指南...

https://www.digitalocean.com/community/tutorials/how-to-serve-flask-applications-with-uwsgi-and-nginx-on-ubuntu-16-04

问题是当我尝试使用端口 80 上的 Web 浏览器连接到服务器的 ip 时,我收到了502 Bad Gateway。当我检查日志时,它说 nginx 找不到我在配置文件中指定的 unix 套接字.

错误是...

2016/08/29 23:23:20 [crit] 2792#2792: *120 connect() to unix:///home/me/appname/appname/appname.sock failed (2: No such file or directory) while connecting to upstream, client: ip.goes.in.here, server: here.goes.the.ip, request: "GET /favicon.ico HTTP/1.1", upstream: "uwsgi://unix:///home/me/appname/appname/appname.sock:", host: "the.ip.goes.here", referrer: "http://all.of.teh.ips/"
Run Code Online (Sandbox Code Playgroud)

我的服务器块看起来像这样......

server {
  listen 80;
  server_name ip.address.goes.here;

  location …
Run Code Online (Sandbox Code Playgroud)

linux ubuntu nginx uwsgi flask

6
推荐指数
1
解决办法
7768
查看次数

标签 统计

flask ×1

linux ×1

nginx ×1

ubuntu ×1

uwsgi ×1