Django and Nginx through uwsgi is not working

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Django and Nginx through uwsgi is not working

valerio orfano
Hi All

i ve created a django application not using virtual environment. I ve installed nginx and trying to integrate them via uwsgi application.
Here my configurations files.

    [uwsgi]
    chdir = /home/elastic/workspace/ES_Brevetti
    wsgi-file = ES_Brevetti/wsgi.py
    master = true
    processes = 5
    uid = nginx
    gid = nginx
    socket = unix:///socket/uwsgi.sock
    chmod-socket = 666
    vacuum = true

i've created the file /sockect/uwsgi.sock with permission 777  

chown nginx:nginx -R /sockect/uwsgi.sock

and below nginx conf file:

    upstream django {
        server unix:///socket/uwsgi.sock; # for a file socket
        #server 127.0.0.1:8001; # for a web port socket (we'll use this first)
    }
    server {
        listen 80;
        server_name 10.184.2.231;
        error_log /var/log/nginx/error.log;
        access_log /var/log/nginx/access.log;
        charset utf-8;
       
        location /static/ {
            alias /home/elastic/workspace/ES_Brevetti;
        }

        location / {
            include         uwsgi_params;
            uwsgi_pass      unix:///socket/uwsgi.sock;
        }
    }


When i launch "systemctl start nginx" nginx is started with error:
 connect() to unix:///socket/uwsgi.sock failed (111: Connection refused) while connecting to upstream,
 
 When i run uwsgi --ini /etc/uwsgi/sites/ES_Brevetti.ini  it doesnt run with error:

    .....
    lock engine: pthread robust mutexes
    thunder lock: disabled (you can enable it with --thunder-lock)
    bind(): Permission denied [core/socket.c line 230]

   
What i am doing wrong? On google i can only see configurations with VENV while i am not using virtual environment.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/891545d5-a99c-425d-8171-c6a9e43f5dd8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Django and Nginx through uwsgi is not working

Vijay Khemlani
Not sure if a typo on your email, but your command says

"chown nginx:nginx -R /sockect/uwsgi.sock"

sockect ?

On 3/16/17, valerio orfano <[hidden email]> wrote:

> Hi All
>
> i ve created a django application not using virtual environment. I ve
> installed nginx and trying to integrate them via uwsgi application.
> Here my configurations files.
>
>     [uwsgi]
>     chdir = /home/elastic/workspace/ES_Brevetti
>     wsgi-file = ES_Brevetti/wsgi.py
>     master = true
>     processes = 5
>     uid = nginx
>     gid = nginx
>     socket = unix:///socket/uwsgi.sock
>     chmod-socket = 666
>     vacuum = true
>
> i've created the file /sockect/uwsgi.sock with permission 777
>
> chown nginx:nginx -R /sockect/uwsgi.sock
>
> and below nginx conf file:
>
>     upstream django {
>         server unix:///socket/uwsgi.sock; # for a file socket
>         #server 127.0.0.1:8001; # for a web port socket (we'll use this
> first)
>     }
>     server {
>         listen 80;
>         server_name 10.184.2.231;
>         error_log /var/log/nginx/error.log;
>         access_log /var/log/nginx/access.log;
>         charset utf-8;
>
>         location /static/ {
>             alias /home/elastic/workspace/ES_Brevetti;
>         }
>
>         location / {
>             include         uwsgi_params;
>             uwsgi_pass      unix:///socket/uwsgi.sock;
>         }
>     }
>
>
> When i launch "systemctl start nginx" nginx is started with error:
>  connect() to unix:///socket/uwsgi.sock failed (111: Connection refused)
> while connecting to upstream,
>
>  When i run uwsgi --ini /etc/uwsgi/sites/ES_Brevetti.ini  it doesnt run
> with error:
>
>     .....
>     lock engine: pthread robust mutexes
>     thunder lock: disabled (you can enable it with --thunder-lock)
>     bind(): Permission denied [core/socket.c line 230]
>
>
> What i am doing wrong? On google i can only see configurations with VENV
> while i am not using virtual environment.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [hidden email].
> To post to this group, send email to [hidden email].
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/891545d5-a99c-425d-8171-c6a9e43f5dd8%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CALn3ei3kOMcm5UL%2BPojo%3Dsa7r9jk9zZRDi_2QGDBh0%3Da_fhcAQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Django and Nginx through uwsgi is not working

django-users mailing list
In reply to this post by valerio orfano
On Thu, Mar 16, 2017 at 12:25 PM, valerio orfano <[hidden email]> wrote:

> Hi All
>
> i ve created a django application not using virtual environment. I ve
> installed nginx and trying to integrate them via uwsgi application.
> Here my configurations files.
>
>     [uwsgi]
>     chdir = /home/elastic/workspace/ES_Brevetti
>     wsgi-file = ES_Brevetti/wsgi.py
>     master = true
>     processes = 5
>     uid = nginx
>     gid = nginx
>     socket = unix:///socket/uwsgi.sock
>     chmod-socket = 666
>     vacuum = true
>
> i've created the file /sockect/uwsgi.sock with permission 777
>
> chown nginx:nginx -R /sockect/uwsgi.sock

When you say you've "created the file /socket/uwsgi.sock", what have
you actually done?

You should have made a directory that uwsgi will be able to create a
unix socket in. You should not create a regular file, or even a named
fifo, with the same name as the socket, otherwise uwsgi will be unable
to create the socket.

Typically people do this by placing their socket files in /tmp or
/var/tmp, a world writeable sticky directory.

Cheers

Tom

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAFHbX1JbngRuEkjj_DvZQBinGtFi%3DKaJqN17qeMuQpxZH%3D1XDA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Django and Nginx through uwsgi is not working

valerio orfano
In reply to this post by Vijay Khemlani
Ya it was a typo when writing

On Thursday, March 16, 2017 at 1:30:21 PM UTC+1, Vijay Khemlani wrote:
Not sure if a typo on your email, but your command says

"chown nginx:nginx -R /sockect/uwsgi.sock"

sockect ?

On 3/16/17, valerio orfano <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="8BaMYbTBBAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">ingor...@...> wrote:

> Hi All
>
> i ve created a django application not using virtual environment. I ve
> installed nginx and trying to integrate them via uwsgi application.
> Here my configurations files.
>
>     [uwsgi]
>     chdir = /home/elastic/workspace/ES_Brevetti
>     wsgi-file = ES_Brevetti/wsgi.py
>     master = true
>     processes = 5
>     uid = nginx
>     gid = nginx
>     socket = unix:///socket/uwsgi.sock
>     chmod-socket = 666
>     vacuum = true
>
> i've created the file /sockect/uwsgi.sock with permission 777
>
> chown nginx:nginx -R /sockect/uwsgi.sock
>
> and below nginx conf file:
>
>     upstream django {
>         server unix:///socket/uwsgi.sock; # for a file socket
>         #server <a href="http://127.0.0.1:8001" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2F127.0.0.1%3A8001\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNE8lctURZp4thmlXiKDuirqv4TmeA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2F127.0.0.1%3A8001\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNE8lctURZp4thmlXiKDuirqv4TmeA&#39;;return true;">127.0.0.1:8001; # for a web port socket (we'll use this
> first)
>     }
>     server {
>         listen 80;
>         server_name 10.184.2.231;
>         error_log /var/log/nginx/error.log;
>         access_log /var/log/nginx/access.log;
>         charset utf-8;
>
>         location /static/ {
>             alias /home/elastic/workspace/ES_Brevetti;
>         }
>
>         location / {
>             include         uwsgi_params;
>             uwsgi_pass      unix:///socket/uwsgi.sock;
>         }
>     }
>
>
> When i launch "systemctl start nginx" nginx is started with error:
>  connect() to unix:///socket/uwsgi.sock failed (111: Connection refused)
> while connecting to upstream,
>
>  When i run uwsgi --ini /etc/uwsgi/sites/ES_Brevetti.ini  it doesnt run
> with error:
>
>     .....
>     lock engine: pthread robust mutexes
>     thunder lock: disabled (you can enable it with --thunder-lock)
>     bind(): Permission denied [core/socket.c line 230]
>
>
> What i am doing wrong? On google i can only see configurations with VENV
> while i am not using virtual environment.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="8BaMYbTBBAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">django-users...@googlegroups.com.
> To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="8BaMYbTBBAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">django...@....
> Visit this group at <a href="https://groups.google.com/group/django-users" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/group/django-users&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/group/django-users&#39;;return true;">https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> <a href="https://groups.google.com/d/msgid/django-users/891545d5-a99c-425d-8171-c6a9e43f5dd8%40googlegroups.com" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/django-users/891545d5-a99c-425d-8171-c6a9e43f5dd8%40googlegroups.com&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/django-users/891545d5-a99c-425d-8171-c6a9e43f5dd8%40googlegroups.com&#39;;return true;">https://groups.google.com/d/msgid/django-users/891545d5-a99c-425d-8171-c6a9e43f5dd8%40googlegroups.com.
> For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.
>

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/4c6a85d2-85c6-4569-81f9-f74cf9ed63bc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Django and Nginx through uwsgi is not working

valerio orfano
In reply to this post by django-users mailing list
Hi Tom if i dont create the file i get the error: unix:///tmp/uwsgi.sock failed (2: No such file or directory)

On Thursday, March 16, 2017 at 1:47:12 PM UTC+1, Tom Evans wrote:
On Thu, Mar 16, 2017 at 12:25 PM, valerio orfano <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="5Y0TwJ_CBAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">ingor...@...> wrote:

> Hi All
>
> i ve created a django application not using virtual environment. I ve
> installed nginx and trying to integrate them via uwsgi application.
> Here my configurations files.
>
>     [uwsgi]
>     chdir = /home/elastic/workspace/ES_Brevetti
>     wsgi-file = ES_Brevetti/wsgi.py
>     master = true
>     processes = 5
>     uid = nginx
>     gid = nginx
>     socket = unix:///socket/uwsgi.sock
>     chmod-socket = 666
>     vacuum = true
>
> i've created the file /sockect/uwsgi.sock with permission 777
>
> chown nginx:nginx -R /sockect/uwsgi.sock

When you say you've "created the file /socket/uwsgi.sock", what have
you actually done?

You should have made a directory that uwsgi will be able to create a
unix socket in. You should not create a regular file, or even a named
fifo, with the same name as the socket, otherwise uwsgi will be unable
to create the socket.

Typically people do this by placing their socket files in /tmp or
/var/tmp, a world writeable sticky directory.

Cheers

Tom

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/88eb9c79-4823-40ac-a6e3-f6f810952c8e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Django and Nginx through uwsgi is not working

Melvyn Sopacua
In reply to this post by valerio orfano

On Thursday 16 March 2017 05:25:32 valerio orfano wrote:

 

> Here my configurations files.

>

> [uwsgi]

> chdir = /home/elastic/workspace/ES_Brevetti

> wsgi-file = ES_Brevetti/wsgi.py

> master = true

> processes = 5

> uid = nginx

> gid = nginx

> socket = unix:///socket/uwsgi.sock

 

Where did you read the unix prototol is a network protocol that requires two slashes to indicate it is? And then add another to reference the root of the network domain?

 

> uwsgi_pass unix:///socket/uwsgi.sock;

 

See above.

--

Melvyn Sopacua

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/5866801.BESY0mt1MW%40devstation.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Django and Nginx through uwsgi is not working

valerio orfano
I got it here "http://uwsgi-docs.readthedocs.io/en/latest/Nginx.html" and others actually 

On Thursday, March 16, 2017 at 4:51:35 PM UTC+1, Melvyn Sopacua wrote:

On Thursday 16 March 2017 05:25:32 valerio orfano wrote:

 

> Here my configurations files.

>

> [uwsgi]

> chdir = /home/elastic/workspace/ES_Brevetti

> wsgi-file = ES_Brevetti/wsgi.py

> master = true

> processes = 5

> uid = nginx

> gid = nginx

> socket = unix:///socket/uwsgi.sock

 

Where did you read the unix prototol is a network protocol that requires two slashes to indicate it is? And then add another to reference the root of the network domain?

 

> uwsgi_pass unix:///socket/uwsgi.sock;

 

See above.

--

Melvyn Sopacua

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/f2255468-2f43-4b5c-92d7-7b6ceaf9338d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Django and Nginx through uwsgi is not working

Rafael E. Ferrero
I've been using this tutorial on a Salix Linux and everythings goes well


Rafael E. Ferrero

2017-03-16 15:04 GMT-03:00 valerio orfano <[hidden email]>:
I got it here "http://uwsgi-docs.readthedocs.io/en/latest/Nginx.html" and others actually 

On Thursday, March 16, 2017 at 4:51:35 PM UTC+1, Melvyn Sopacua wrote:

On Thursday 16 March 2017 05:25:32 valerio orfano wrote:

 

> Here my configurations files.

>

> [uwsgi]

> chdir = /home/elastic/workspace/ES_Brevetti

> wsgi-file = ES_Brevetti/wsgi.py

> master = true

> processes = 5

> uid = nginx

> gid = nginx

> socket = unix:///socket/uwsgi.sock

 

Where did you read the unix prototol is a network protocol that requires two slashes to indicate it is? And then add another to reference the root of the network domain?

 

> uwsgi_pass unix:///socket/uwsgi.sock;

 

See above.

--

Melvyn Sopacua

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/f2255468-2f43-4b5c-92d7-7b6ceaf9338d%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAJJc_8UxZeLk-52ncju6RsPseAmwjgOjh%3DvEZE95rfoT1UBH9g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Django and Nginx through uwsgi is not working

Melvyn Sopacua
In reply to this post by valerio orfano

On Thursday 16 March 2017 11:04:53 valerio orfano wrote:

> http://uwsgi-docs.readthedocs.io/en/latest/Nginx.htm

*sigh*

 

http://nginx.org/en/docs/http/ngx_http_uwsgi_module.html#uwsgi_pass

 

unix:/path/to

 

Maybe unix:/// works, maybe it doesn't. But file:/// is supposed to be the exception to the URI rules, not the rule itself.

 

Also, just providing a plain path (socket = /var/run/uwsgi/myapp.sock) in uwsgi.ini works.

 

Of course, it will try to create the socket under the user uwsgi runs as, so permissions for the directory need to allow that.

--

Melvyn Sopacua

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/3861233.uUr4JQkNb4%40devstation.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Django and Nginx through uwsgi is not working

valerio orfano
I want to thank Melvyn publicly, without his support i wouldn't succed!

unix:/// in the uwsgi.ini file DOES NOT work (at least in Centos)

insted unix:/  WORKS OUT

Thanx you very much, i've spent days on this issue


On Thursday, March 16, 2017 at 8:58:52 PM UTC+1, Melvyn Sopacua wrote:

On Thursday 16 March 2017 11:04:53 valerio orfano wrote:

> <a href="http://uwsgi-docs.readthedocs.io/en/latest/Nginx.htm" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fuwsgi-docs.readthedocs.io%2Fen%2Flatest%2FNginx.htm\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF9BHJtYR_4Czrr_itxIH_GHEP0PA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fuwsgi-docs.readthedocs.io%2Fen%2Flatest%2FNginx.htm\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF9BHJtYR_4Czrr_itxIH_GHEP0PA&#39;;return true;">http://uwsgi-docs.readthedocs.io/en/latest/Nginx.htm

*sigh*

 

<a href="http://nginx.org/en/docs/http/ngx_http_uwsgi_module.html#uwsgi_pass" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fnginx.org%2Fen%2Fdocs%2Fhttp%2Fngx_http_uwsgi_module.html%23uwsgi_pass\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHD-CdAyz3fGfOdQMqzr5WDVkVTrw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fnginx.org%2Fen%2Fdocs%2Fhttp%2Fngx_http_uwsgi_module.html%23uwsgi_pass\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHD-CdAyz3fGfOdQMqzr5WDVkVTrw&#39;;return true;">http://nginx.org/en/docs/http/ngx_http_uwsgi_module.html#uwsgi_pass

 

unix:/path/to

 

Maybe unix:/// works, maybe it doesn't. But file:/// is supposed to be the exception to the URI rules, not the rule itself.

 

Also, just providing a plain path (socket = /var/run/uwsgi/myapp.sock) in uwsgi.ini works.

 

Of course, it will try to create the socket under the user uwsgi runs as, so permissions for the directory need to allow that.

--

Melvyn Sopacua

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/b6cfe3f2-ca74-44b3-830a-25c5f3c8afc3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Django and Nginx through uwsgi is not working

Antonis Christofides-2

Thanx you very much, i've spent days on this issue
I'm sorry to hear that, especially because when I was using uwsgi I was also spending days for various issues. All this pain went away when I started to use Gunicorn. You can read more about that in https://djangodeployment.com/2017/01/02/which-wsgi-server-should-i-use/.

Regards,

A.

Antonis Christofides
http://djangodeployment.com
On 03/17/2017 09:19 AM, valerio orfano wrote:
I want to thank Melvyn publicly, without his support i wouldn't succed!

unix:/// in the uwsgi.ini file DOES NOT work (at least in Centos)

insted unix:/  WORKS OUT

Thanx you very much, i've spent days on this issue


On Thursday, March 16, 2017 at 8:58:52 PM UTC+1, Melvyn Sopacua wrote:

On Thursday 16 March 2017 11:04:53 valerio orfano wrote:

> <a moz-do-not-send="true" href="http://uwsgi-docs.readthedocs.io/en/latest/Nginx.htm" target="_blank" rel="nofollow" onmousedown="this.href='http://www.google.com/url?q\x3dhttp%3A%2F%2Fuwsgi-docs.readthedocs.io%2Fen%2Flatest%2FNginx.htm\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF9BHJtYR_4Czrr_itxIH_GHEP0PA';return true;" onclick="this.href='http://www.google.com/url?q\x3dhttp%3A%2F%2Fuwsgi-docs.readthedocs.io%2Fen%2Flatest%2FNginx.htm\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF9BHJtYR_4Czrr_itxIH_GHEP0PA';return true;">http://uwsgi-docs.readthedocs.io/en/latest/Nginx.htm

*sigh*

 

<a moz-do-not-send="true" href="http://nginx.org/en/docs/http/ngx_http_uwsgi_module.html#uwsgi_pass" target="_blank" rel="nofollow" onmousedown="this.href='http://www.google.com/url?q\x3dhttp%3A%2F%2Fnginx.org%2Fen%2Fdocs%2Fhttp%2Fngx_http_uwsgi_module.html%23uwsgi_pass\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHD-CdAyz3fGfOdQMqzr5WDVkVTrw';return true;" onclick="this.href='http://www.google.com/url?q\x3dhttp%3A%2F%2Fnginx.org%2Fen%2Fdocs%2Fhttp%2Fngx_http_uwsgi_module.html%23uwsgi_pass\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHD-CdAyz3fGfOdQMqzr5WDVkVTrw';return true;">http://nginx.org/en/docs/http/ngx_http_uwsgi_module.html#uwsgi_pass

 

unix:/path/to

 

Maybe unix:/// works, maybe it doesn't. But file:/// is supposed to be the exception to the URI rules, not the rule itself.

 

Also, just providing a plain path (socket = /var/run/uwsgi/myapp.sock) in uwsgi.ini works.

 

Of course, it will try to create the socket under the user uwsgi runs as, so permissions for the directory need to allow that.

--

Melvyn Sopacua

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/b6cfe3f2-ca74-44b3-830a-25c5f3c8afc3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/be7e5d19-40b4-4d8a-c4e3-1812c634b090%40djangodeployment.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Django and Nginx through uwsgi is not working

Vijay Khemlani
I fail to see what's so complex of uwsgi for a simple deploy, my
typical configuration file has 8 lines

On 3/17/17, Antonis Christofides <[hidden email]> wrote:

>> Thanx you very much, i've spent days on this issue
> I'm sorry to hear that, especially because when I was using uwsgi I was
> also
> spending days for various issues. All this pain went away when I started to
> use
> Gunicorn. You can read more about that in
> https://djangodeployment.com/2017/01/02/which-wsgi-server-should-i-use/.
>
> Regards,
>
> A.
>
> Antonis Christofides
> http://djangodeployment.com
>
> On 03/17/2017 09:19 AM, valerio orfano wrote:
>> I want to thank Melvyn publicly, without his support i wouldn't succed!
>>
>> unix:/// in the uwsgi.ini file DOES NOT work (at least in Centos)
>>
>> insted unix:/  WORKS OUT
>>
>> Thanx you very much, i've spent days on this issue
>>
>>
>> On Thursday, March 16, 2017 at 8:58:52 PM UTC+1, Melvyn Sopacua wrote:
>>
>>     On Thursday 16 March 2017 11:04:53 valerio orfano wrote:
>>
>>     > http://uwsgi-docs.readthedocs.io/en/latest/Nginx.htm
>>     <http://uwsgi-docs.readthedocs.io/en/latest/Nginx.htm>
>>
>>     *sigh*
>>
>>
>>
>>     http://nginx.org/en/docs/http/ngx_http_uwsgi_module.html#uwsgi_pass
>>     <http://nginx.org/en/docs/http/ngx_http_uwsgi_module.html#uwsgi_pass>
>>
>>
>>
>>     unix:/path/to
>>
>>
>>
>>     Maybe unix:/// works, maybe it doesn't. But file:/// is supposed to be
>> the
>>     exception to the URI rules, not the rule itself.
>>
>>
>>
>>     Also, just providing a plain path (socket = /var/run/uwsgi/myapp.sock)
>> in
>>     uwsgi.ini works.
>>
>>
>>
>>     Of course, it will try to create the socket under the user uwsgi runs
>> as,
>>     so permissions for the directory need to allow that.
>>
>>     --
>>
>>     Melvyn Sopacua
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [hidden email]
>> <mailto:[hidden email]>.
>> To post to this group, send email to [hidden email]
>> <mailto:[hidden email]>.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/b6cfe3f2-ca74-44b3-830a-25c5f3c8afc3%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/b6cfe3f2-ca74-44b3-830a-25c5f3c8afc3%40googlegroups.com?utm_medium=email&utm_source=footer>.
>> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [hidden email].
> To post to this group, send email to [hidden email].
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/be7e5d19-40b4-4d8a-c4e3-1812c634b090%40djangodeployment.com.
> For more options, visit https://groups.google.com/d/optout.
>

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CALn3ei04gX2%2BVWkYfTiykX4ONAQVrzswJG8HWyrt%3DtYemvwZPw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Loading...