listen 10.8.0.1:8081;
server_name py.loc;
root /x/home/www/py.loc/htdocs;
access_log /x/home/log2/py.log;
error_log /x/home/log2/py.err info;
charset utf-8;
location / {
index index.html;
}
location /bin {
fastcgi_pass unix:/var/run/fcgiwrap.socket;
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
# wget py.loc:8081/bin
--2018-12-10 18:49:41-- http://py.loc:8081/bin
Resolving py.loc... 10.8.0.1
Connecting to py.loc|10.8.0.1|:8081... connected.
HTTP request sent, awaiting response... 502 Bad Gateway
2018-12-10 18:49:41 ERROR 502: Bad Gateway.
в error логе nginx
2018/12/10 18:49:41 [info] 19063#0: *174 recv() failed (104: Connection reset by peer) while sending to client, client: 10.8.0.1, server: py.loc, request: "GET /bin HTTP/1.0", upstream: "fastcgi://unix:/var/run/fcgiwrap.socket", host: "py.loc:8081"
если запускать сам py файл из консоли, то всё ок
# ./bin
Content-type: text/html
куда рыть?
тут
Обсуждают сегодня