I try to configure uWsgi, Django ,Nginx with this document: http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html
Finish config the uwsgi.ini
file, create a soft link at /etc/uwsgi/vassals
.
Failed at the last step :Make uWSGI startup when the system boots.
When run this command:
sudo /usr/local/bin/uwsgi --emperor /etc/uwsgi/vassals --uid www-data --gid www-data
I got this error:
clock source: unix
detected number of CPU cores: 1
current working directory: /etc/uwsgi/vassals
detected binary path: /usr/local/bin/uwsgi
!!! no internal routing support, rebuild with pcre support !!!
your processes number limit is 3813
your memory page size is 4096 bytes
detected max file descriptor number: 1024
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
bind(): Permission denied [core/socket.c line 227]
Tue May 27 05:29:26 2014 - [emperor] curse the uwsgi instance uwsgi.ini (pid: 1391)
Tue May 27 05:29:29 2014 - [emperor] removed uwsgi instance uwsgi.ini
If I run this command without sudo
, everything is OK.
I've add user "kk" into group "www-data", and here is the uwsgi.ini
[uwsgi]
chdir = /home/kk/XXXXXXX
module = wsgi
home = /home/kk/XXXXXXX
master = true
processes = 10
socket = /home/kk/XXXXXXX/mysite.sock
chmod-socket = 666
vacuum = true
I guess maybe I made mistake on file permission. Does anybody have good idea?Thank you.
Update:
The official document is correct, I follow the steps to deploy the project in another new VPS, no error occurred.