centos6.5部署python3.8的django+uwsgi+nginx


几个配置文件:

nginx配置:
uwsgi的ini文件:

[uwsgi]
# Django-related settings
socket = 127.0.0.1:8010
# the base directory (full path)
chdir   = /ttdata/djangos/Isay
# Django s wsgi file
module  = Isay.wsgi:application
# wsgi-file = myproject/wsgi.py
# process-related settings -master
master  = true
# maximum number of worker processes
processes   = 4
# ... with appropriate permissions - may be needed
# chmod-socket= 664
# clear environment on exit
vacuum  = true
daemonize   = /ttdata/djangos/Isay/uwsgi_log.log
pidfile = /ttdata/djangos/Isay/uwsgi_pid.log
# if errors
#plugins = python3
#virtualenv = /usr/local/python38

nginx的配置文件:

server {
listen 80;
server_name abc.example.com;
charset UTF-8;
client_max_body_size 75M;
location / {
include uwsgi_params;
uwsgi_pass 127.0.0.1:8010;
uwsgi_read_timeout 20;
}
#ttkc denysvn and rewrite and logs
#location ~ .*.(svn|git|cvs){deny all;}
access_log  /opt/django/access.log;
error_log   /opt/django/error.log;
}

原文链接:https://blog.yongit.com/note/130536.html