Inspired by this article: https://www.cnblogs.com/zhangjpn/p/6876412.html?utm_source=itdadao& utm_medium=referral
Uwsgi official documentation configuration configuration 】 【 reference Flask: https://uwsgi-docs-zh.readthedocs.io/zh_CN/latest/WSGIquickstart.html
Customize a UWSGI.ini file and add the following
Uwsgi official documentation configuration configuration 】 【 reference Flask: https://uwsgi-docs-zh.readthedocs.io/zh_CN/latest/WSGIquickstart.html
Customize a UWSGI.ini file and add the following
[uwsgi]
# socket=Extranet ip: port (sockets are used for nginx connections, sockets are not supported for normal http connections)
http=0.0.0.0:8099
chdir=/root/uniapp-Flask/
wsgi-file=/root/uniapp-Flask/test.py
# must be parameterized, otherwise it will report Internal Server Error
callable=app
processes=4
threads=2
master=True
pidfile=uwsgi.pid
daemonize=uswgi.log
stop: uwsgi — stop uwsgi. Pid [if it cannot be stopped, use the kill command]
restart: uwsgi — reload uwsgi. Pid
USES the HTTP protocol to check the operation of the website, it works normally, but the static file cannot be loaded
// Command Line Run
uwsgi --http 0.0.0.0:8099 --wsgi-file main.py --callable app --processes 4 --threads 2