The combination uwsgi/nginx has been recommended often on this list.
After an upgrade from wheezy to jessy the nginx, uswgi-combination does not
play nicely together. We have also tried to move the socket to tmp, but
that did not change anything in as far as the refused connection is
concerned.
Any idea why this problem is there? And how to solve it?
The socket:
ls -la /var/uwsgi/app/web2py/socket
srwxrwxrwx 1 www-data www-data 0 Jan 20 14:40 /var/uwsgi/app/web2py/socket
The logs:
$ tail -n 1 /var/log/nginx/error.log
2016/01/20 14:33:27 [error] 4103#0: *8 connect() to
unix:///var/uwsgi/app/web2py/socket failed (111: Connection refused) while
connecting to upstream, client: 146.232.117.197, server: crest2, request:
"GET / HTTP/1.1", upstream: "uwsgi://unix:///var/uwsgi/app/web2py/socket:",
host: "crest2.sun.ac.za"
$ tail emperor.log -n 5
thunder lock: disabled (you can enable it with --thunder-lock)
uwsgi socket 0 bound to UNIX address /var/uwsgi/app/web2py/socket fd 3
bind(): Permission denied [core/socket.c line 227]
Wed Jan 20 14:40:45 2016 - [emperor] curse the uwsgi instance web2py.xml
(pid: 4957)
Wed Jan 20 14:40:45 2016 - [emperor] removed uwsgi instance web2py.xml
The configurations:
server {
listen 80;
server_name $hostname;
uwsgi_read_timeout 2400;
location ~* /(\w+)/static(?:/_[\d]+\.[\d]+\.[\d]+)?/(.*)$ {
alias /home/www-data/web2py/applications/$1/static/$2;
expires max;
}
location / {
uwsgi_pass unix:///var/uwsgi/app/web2py/socket;
include uwsgi_params;
uwsgi_param UWSGI_SCHEME $scheme;
uwsgi_param SERVER_SOFTWARE nginx/$nginx_version;
}
}
server {
listen 443 default_server ssl;
server_name $hostname;
ssl_certificate /etc/nginx/ssl/web2py.crt;
ssl_certificate_key /etc/nginx/ssl/web2py.key;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
ssl_ciphers
ECDHE-RSA-AES256-SHA:DHE-RSA-AES256-SHA:DHE-DSS-AES256-SHA:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA;
ssl_protocols TLSv1.2;
keepalive_timeout 70;
location ~* /(\w+)/static(?:/_[\d]+.[\d]+.[\d]+)?/(.*)$ {
alias /home/www-data/web2py/applications/$1/static/$2;
expires max;
}
location / {
uwsgi_pass
unix:///var/uwsgi/app/web2py/socket;
uwsgi_buffer_size 128k;
uwsgi_buffers 8 256k;
uwsgi_busy_buffers_size 256k;
include
uwsgi_params;
uwsgi_param UWSGI_SCHEME $scheme;
uwsgi_param SERVER_SOFTWARE nginx/$nginx_version;
}
}
Regards
Johann
--
Because experiencing your loyal love is better than life itself,
my lips will praise you. (Psalm 63:3)
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.