Answer the question
In order to leave comments, you need to log in
Fix error when configuring uWSGI?
I deploy a django project on a production server, set up nginx (winwin.sock is a file created by hand and chmod 666)
upstream django {
server unix:///tmp/winwin.sock;
}
server {
listen 80;
listen 443;
client_max_body_size 75M;
charset utf-8;
access_log /home/winwin/logs/accsess.log;
error_log /home/winwin/logs/error.log;
location /site_media/media/ {
alias /home/winwin/winwin-back/site_media/media/;
}
location /
{
uwsgi_pass django;
include /home/winwin/winwin-back/deploy/uwsgi_params;
uwsgi_buffers 8 2048k;
}
}
[uwsgi]
socket = /tmp/winwin.sock
chmod-socket = 666
chdir = /home/winwin/winwin-back/
module = winwin.wsgi
master = true
processes = 4
threads = 2
daemonize = /home/winwin/winwin-back/deploy/logs/uwsgi.log
Answer the question
In order to leave comments, you need to log in
Good evening, what does uwsgi write in the logs? I had the same trouble, I had to not use sock I
redid the settings exactly like this, I throw off from one working project
Settings uwsgi, installed as a virtual environment module via pip
[uwsgi]
plugins = /home/web/bin/python3.3
pythonpath = /home/web/lib/python3.3/site-packages/
virtualenv = /home/web/
chdir = /home/web/app/
master = true
env = DJANGO_SETTINGS_MODULE=app.settings
module = django.core.handlers.wsgi:WSGIHandler()
max-requests=1000
socket = 127.0.0.1:8080
enable-threads=true
server{
listen 80;
server_name domen.ru
access_log /home/web/logs/access.log;
error_log /home/web/logs/error.log;
location /static/ {
alias /home/web/static/;
}
location /favicon.ico {
alias /home/web/static/favicon.ico;
}
location / {
#uwsgi_pass unix:///home/web/socket.sock;
uwsgi_pass 127.0.0.1:8080;
include uwsgi_params;
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question