@frilix
Иногда "творю"

Настройка сервера: uwsgi, nginx?

Доброго времени суток, настраиваю сервер первый раз. Все делаю по туториалу itman.in/django-webserver-nginx-uwsgi но при исполнении последней инструкции:
uwsgi --ini mysite_uwsgi.ini
получаю ошибку:
[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]


Второе: Пока домен не прикреплял, правильно ли я прописал конфиг nginx?
# 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
  • Вопрос задан
  • 586 просмотров
Решения вопроса 1
@frilix Автор вопроса
Иногда "творю"
Поставил права на папку и проблема решилась
Ответ написан
Комментировать
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы