您好,登錄后才能下訂單哦!
1. nginx
安裝不在此闡述,直接上關鍵配置
server {
listen 80;
server_name _;
access_log /var/log/nginx/platform_admin.log main;
error_log /var/log/nginx/platform_admin_err.log ;
location /static {
root /var/www/platform_admin/resources/;
}
location / {
uwsgi_pass 127.0.0.1:9999;
include uwsgi_params;
}
}
2.python文件解析使用UWSGI,安裝不闡述
[uwsgi]
uid = root
gid = root
pidfile = /run/uwsgi/uwsgi.pid
emperor = /etc/uwsgi.d
stats = /run/uwsgi/stats.sock
chmod-socket = 660
emperor-tyrant = true
socket = 127.0.0.1:9999
master = true
processes = 4
env DJANGO_SETTINGS_MODULE=platform_admin.settings
chdir = /var/www/platform_admin
wsgi-file = /var/www/platform_admin/platform_admin/wsgi.py
module = platform_admin.wsgi:application
profiler = true
memory-report = true
enable-threads = true
logdata = true
limit-as = 6048
daemonize = /var/log/django_uwsgi.log
3.啟動UWSGI
# /etc/init.d/uwsgi status
查看狀態
#/etc/init.d/uwsgi status
uwsgi (pid 10596 10595 10594 10593 10591 10590) is running...
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。