建站服務(wù)器
1. nginx
創(chuàng)新互聯(lián)專注于筠連網(wǎng)站建設(shè)服務(wù)及定制,我們擁有豐富的企業(yè)做網(wǎng)站經(jīng)驗。 熱誠為您提供筠連營銷型網(wǎng)站建設(shè),筠連網(wǎng)站制作、筠連網(wǎng)頁設(shè)計、筠連網(wǎng)站官網(wǎng)定制、微信平臺小程序開發(fā)服務(wù),打造筠連網(wǎng)絡(luò)公司原創(chuàng)品牌,更為您提供筠連網(wǎng)站排名全網(wǎng)營銷落地服務(wù)。安裝不在此闡述,直接上關(guān)鍵配置
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
查看狀態(tài)
#/etc/init.d/uwsgi status
uwsgi (pid 10596 10595 10594 10593 10591 10590) is running...