Answer the question
In order to leave comments, you need to log in
Can't get nginx+uwsgi up?
Can't link uwsgi + nginx
when running test file test.py with hello world response code I get this.
[email protected]:~/domains/sharelink/web$ uwsgi --http :8000 --wsgi-file test.py
*** Starting uWSGI 2.0.17 (64bit) on [Thu Jun 14 13:12:50 2018] ***
compiled with version: 5.4.0 20160609 on 11 June 2018 06:44:18
os: Linux-4.13.0-45-generic #50~16.04.1-Ubuntu SMP Wed May 30 11:18:27 UTC 2018
nodename: blazer-VirtualBox
machine: x86_64
clock source: unix
detected number of CPU cores: 1
current working directory: /home/blazer/domains/sharelink/web
detected binary path: /usr/local/bin/uwsgi
!!! no internal routing support, rebuild with pcre support !!!
*** WARNING: you are running uWSGI without its master process manager ***
your processes number limit is 15572
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)
probably another instance of uWSGI is running on the same address (:8000).
bind(): Address already in use [core/socket.c line 769]
upstream django {
# connect to this socket
server unix:///tmp/uwsgi.sock; # for a file socket
# server 127.0.0.1:8001; # for a web port socket
}
server {
# the port your site will be served on
listen 8080;
root /home/blazer/domains/sharelink;
# the domain name it will serve for
server_name sharelink.ru www.sharelink.ru; # substitute your machine's IP address or FQDN
charset utf-8;
#Max upload size
client_max_body_size 75M; # adjust to taste
# Django media
location /media {
alias /home/blazer/domains/sharelink/media; # your Django project's media files
}
location /static {
alias /home/blazer/domains/sharelink/static; # your Django project's static files
}
# Finally, send all non-media requests to the Django server.
location / {
uwsgi_pass django;
include /etc/nginx/uwsgi_params; # or the uwsgi_params you installed manually
}
[ Пр
[uwsgi]
# Настройки, связанные с Django
# Корневая папка проекта (полный путь)
chdir = /home/blazer/domains/sharelink
# Django wsgi файл
module = sharelink.wsgi.application
# полный путь к виртуальному окружению
home = /home/blazer/virtualenv/sharelink
# общие настройки
# master
master = true
# максимальное количество процессов
processes = 10
# полный путь к файлу сокета
socket = /home/blazer/domains/sharelink/uwsgi.sock
# права доступа к файлу сокета
chmod-socket = 664
# очищать окружение от служебных файлов uwsgi по завершению
vacuum = true
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question