G
G
Grigory Dikiy2016-02-08 19:35:46
Nginx
Grigory Dikiy, 2016-02-08 19:35:46

Server setup: uwsgi, nginx?

Good day, I'm setting up the server for the first time. I do everything according to the itman.in/django-webserver-nginx-uwsgi tutorial, but when I execute the last instruction:
uwsgi --ini mysite_uwsgi.ini
I get an error:

[uWSGI] getting INI configuration from conf/mysite_uwsgi.ini
*** Starting uWSGI 2.0.12 (32bit) on [Mon Feb  8 12:06:26 2016] ***
compiled with version: 4.8.4 on 08 February 2016 12:04:46
os: Linux-2.6.32-042stab111.11 #1 SMP Tue Sep 1 18:19:12 MSK 2015
nodename: vps8511
machine: i686
clock source: unix
pcre jit disabled
detected number of CPU cores: 1
current working directory: /data/mysite
detected binary path: /usr/local/bin/uwsgi
setgid() to 33
setuid() to 33
chdir() to /data/mysite/project
your processes number limit is 29855
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 230]

Second: While the domain was not attached, did I correctly register the nginx config?
# mysite_nginx.conf 
 
# the upstream component nginx needs to connect to 
upstream django { 
    server unix:///data/mysite/mysite.sock; # for a file socket 
} 
 
# configuration of the server 
server { 
    listen      80;  
    server_name 31.184.197.219; # доменное им�~O �~Aай�~Bа 
    charset     utf-8; 
 
    client_max_body_size 75M; # max upload size   
 
    # Django media 
    location /media  { 
        alias /data/mysite/project/media;   
    } 
 
    location /static { 
        alias /data/mysite/project/static;  
    } 
 
    location / { 
        uwsgi_pass  django; 
        include     uwsgi_params;  
        } 
    }

uwsgi:
# mysite_uwsgi.ini file
[uwsgi]

chdir           = /data/mysite/project
module          = project.wsgi
home            = /data/mysite/env/virtualenv

# 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
uid             = www-data
gid             = www-data

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
Grigory Dikiy, 2016-02-08
@frilix

I set the permissions on the folder and the problem was solved

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question