G
G
Grigory Dikiy2016-02-10 21:01:25
Nginx
Grigory Dikiy, 2016-02-10 21:01:25

UWSGI setup?

I'm trying to set up a server, but it doesn't work. Customized based on: here . I tried Nginx, it gives out statics here , but uwsgi itself doesn’t work very well. I take the project here . As you can see, he has wsgi.py in his mysite folder. Project structure as per tutorial.
wsgi:

#mysite_uwsgi.ini file
[uwsgi]

# Django-related settings
# the base directory (full path)
chdir           = /data/mysite/project
# Django's wsgi file
module          = wsgi
# the virtualenv (full path)
home            = /data/mysite/env/virtualenv

# process-related settings
# master
master          = true
# maximum number of worker processes
processes       = 10
# the socket
socket          = /data/mysite/mysite.sock
# ... with appropriate permissions - may be needed
chmod-socket    = 664
# clear environment on exit
vacuum          = true
# account to start process
uid             = www-data
gid             = www-data
# Output messages to log
daemonize=/var/log/uwsgi/mysite.log

Tried to execute: su www-data /bin/touch /data/mysite/mysite.sock Issues
: This account is currently not available.
If this is due to the fact that www-data is not added, I will be grateful if you tell me how to add it. I suspect that the path to module is incorrectly spelled out . In Linux matters, I'm a layman so far)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Artem, 2016-02-10
@frilix

uid = user gid = user, and in general, IMHO, it's better to put all the joy in the user's directory, while 1 project - 1 user (not root) and usermod -G sudo,www-data,adm user
click

R
r1ch, 2016-02-10
@r1ch

[uwsgi]
env=DJANGO_SETTINGS_MODULE

chdir=/home/rs/dev/django/tastyapi/project
module=project.wsgi:application

pidfile=/tmp/project-master.pid
socket=127.0.0.1:8000

home=/home/rs/dev/django/tastyapi/venv

master=true
processes=2
threads=6
harakiri=20
max-requests=5000
vacuum=true

enable-threads=true

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question