Answer the question
In order to leave comments, you need to log in
Where is the error in setting up uwsgi + nginx + django?
Deploying a project to a server.
I work according to the official manual: uwsgi-docs.readthedocs.io/en/latest/tutorials/Djan...
Uwsgi works, django too. Launched by command:
uwsgi --http :8000 --module quantzone.wsgi
uwsgi --socket quantzone.sock --wsgi-file test.py --chmod-socket=666
*** Starting uWSGI 2.0.13.1 (32bit) on [Thu Sep 8 17:03:09 2016] ***
compiled with version: 4.8.4 on 08 September 2016 15:39:48
os: Linux-3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:08:14 UTC 2014
nodename: quant.zone
machine: i686
clock source: unix
detected number of CPU cores: 1
current working directory: /opt/quantzone
detected binary path: /opt/qenv/bin/uwsgi
!!! no internal routing support, rebuild with pcre support !!!
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
*** WARNING: you are running uWSGI without its master process manager ***
your processes number limit is 518
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)
uwsgi socket 0 bound to UNIX address quantzone.sock fd 3
Python version: 3.4.3 (default, Oct 14 2015, 20:37:06) [GCC 4.8.4]
*** Python threads support is disabled. You can enable it with --enable-threads ***
Python main interpreter initialized at 0x8c213c8
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 63988 bytes (62 KB) for 1 cores
*** Operational MODE: single process ***
WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0x8c213c8 pid: 12776 (default app)
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI worker 1 (and the only) (pid: 12776, cores: 1)
# the upstream component nginx needs to connect to
upstream django {
server unix:///opt/quantzone/quantzone.sock; # for a file socket
# server 127.0.0.1:8001; # for a web port socket (we'll use this first)
}
# configuration of the server
server {
# the port your site will be served on
listen 8000;
# the domain name it will serve for
server_name .quant.zone; # 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 /opt/quantzone/media; # your Django project's media files - amend as required
}
location /static {
alias /opt/quantzone/static; # your Django project's static files - amend as required
}
# Finally, send all non-media requests to the Django server.
location / {
uwsgi_pass django;
include /etc/nginx/uwsgi_params; # the uwsgi_params file you installed
}
}
Answer the question
In order to leave comments, you need to log in
chmod-socket=666
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question