<div dir="ltr">What is the output of <div><br></div><div>ls -l <span style="font-size:12.8px">/home/workspace/project/tmp/</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">uwsgi.sock</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">and </span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">ps aux|grep nginx</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px"><br></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 18, 2017 at 12:13 PM, sandyman <span dir="ltr"><<a href="mailto:nginx-forum@forum.nginx.org" target="_blank">nginx-forum@forum.nginx.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">after struggling for almost a week on this I feel I need to reach out for<br>
assistance . Please Help<br>
<br>
I am trying to deploy my project to a production environment<br>
<br>
<br>
In terms of permissions I have read all the forums changed all permissions<br>
i.e. 777 etc etc<br>
srwxrwxrwx uwsgi.sock (owned by me full access ) !!<br>
I've checked over and over all the directory structures etc. Ive swtiched<br>
from unix sockets to http but still<br>
no joy .<br>
<br>
exact error<br>
<br>
<br>
2017/09/18 06:32:56 [error] 15451#0: *1 connect() to<br>
unix:////home/workspace/<wbr>project//<br>
tmp/uwsgi.sock failed (111: Connection refused) while connecting to<br>
upstream, client: 1933<br>
.247.239.160, server: <a href="http://website.xyz" rel="noreferrer" target="_blank">website.xyz</a>, request: "GET / HTTP/1.0", upstream:<br>
"uwsgi://unix:////<br>
/home/workspace/project/tmp/<wbr>uwsgi.sock:", host: "<a href="http://www.website.xyz" rel="noreferrer" target="_blank">www.website.xyz</a>"<br>
<br>
<br>
Nginx configuration:<br>
<br>
upstream _django {<br>
server unix:////home/workspace/<wbr>project/tmp/uwsgi.sock;<br>
}<br>
<br>
server {<br>
listen 62032;<br>
server_name <a href="http://website.xyz" rel="noreferrer" target="_blank">website.xyz</a> <a href="http://www.website.xyz" rel="noreferrer" target="_blank">www.website.xyz</a> ;<br>
<br>
location = /favicon.ico { access_log off; log_not_found off; }<br>
location = /test-this { return 200 "Yes, this is correct\n"; }<br>
location /foo { return 200 "YIKES what a load of codswollop";}<br>
root /home/workspace/project;<br>
<br>
location /static {<br>
alias /home/workspace/project/<wbr>testsite/assets;<br>
}<br>
<br>
location /assets {<br>
root /home/workspace/project/<wbr>testsite/assets;<br>
}<br>
<br>
location / {<br>
include /home/workspace/project/uwsgi_<wbr>params;<br>
#include uwsgi parameters.<br>
uwsgi_pass _django;<br>
#tell nginx to communicate with uwsgi though unix socket<br>
/run/uwsgi/sock.<br>
}<br>
<br>
<br>
<br>
<br>
uwsgi ini file<br>
<br>
# project.ini file<br>
[uwsgi]<br>
chdir = /home/workspace/project/<wbr>testsite<br>
module=testsite.wsgi:<wbr>application<br>
socket = /home/workspace/project/uwsgi.<wbr>sock<br>
chmod-socket = 666<br>
daemonize = /home/workspace/project/tmp/<wbr>uwsgi.log<br>
protocol = http<br>
master = true<br>
vacuum=true<br>
max-requests=5000<br>
processes = 10<br>
<br>
<br>
start script<br>
<br>
#! /bin/bash<br>
PIDFILE=/home/workspace/<wbr>project/startselvacura.pid<br>
<br>
source /home/workspace/project/venv/<wbr>bin/activate<br>
uwsgi --ini /home/workspace/project/uwsgi-<wbr>prod.ini --venv<br>
/home/workspace/project/venv --pidfile $PIDFILE<br>
~<br>
<br>
<br>
<br>
running <a href="https://www.asandhu.xyz/foo" rel="noreferrer" target="_blank">https://www.asandhu.xyz/foo</a><br>
<br>
does return the expected result :<br>
<br>
Posted at Nginx Forum: <a href="https://forum.nginx.org/read.php?2,276427,276427#msg-276427" rel="noreferrer" target="_blank">https://forum.nginx.org/read.<wbr>php?2,276427,276427#msg-276427</a><br>
<br>
______________________________<wbr>_________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">http://mailman.nginx.org/<wbr>mailman/listinfo/nginx</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><b>Anoop P Alias</b> <div><br></div></div></div></div>
</div>