pip install uwsgi
cd / opt / zbmbuilding
vim uwsgi.ini
[Uwsgi]
chdir = /opt/zbmbulding
module = zbm.wsgi
# wsgi-file = /opt/zbmbulding/zbm/wsgi.py
master = true
processes = 3
buffer-size = 65536
socket = 0.0.0.0:8000
vacuum = true
pythonpath = /usr/bin/python
daemonize = /opt/zbmbulding/uwsgi.log
touch uwsgi.log
Not start uwsgi:
LN / root / Py37 / uwsgi / usr / bin / uwsgi
pkill -9 uwsgi
start: uwsgi --ini uwsgi.ini
stop: uwsgi --stop uwsgi.pid
restart: uwsgi --reload uwsgi.pid
uninstall:
Uninstall uwsgi PIP3
sudo APT-GET the Remove uwsgi
yum -y install nginx
nginx -V
cd /etc/nginx/
conf.d cd /
I came * conf
server {
listen 80;
server_name localhost;
access_log /opt/zbm_access.log;
error_log /opt/zbm_error.log;
client_max_body_size 75M;
location / {
# root /usr/share/nginx/html;
root /opt/riskControl;
index index.html index.htm;
}
location /zbm {
include uwsgi_params;
uwsgi_pass 127.0.0.1:8000;
uwsgi_param UWSGI_SCRIPT zbm.wsgi;
uwsgi_param UWSGI_CHDIR /opt/zbmbulding;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location /static {
alias /opt/zbmbulding/static;
}
}