Tag Archives: internal server error

summary of configuration and deployment of uwsgi+nginx+flag in centos7 and why internal server error is prompted [official instructions]

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]
# 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

IIS 404 The page cannot be displayed because an internal server error has occurred

1. allow physical paths in the ApplicationHost. Configuration File

By default, this file is located in %SystemRoot%\system32\inetsrv\config.

Find this file and edit it.

Search for section < httperror…than;

Then add the command allowAbsolutePathsWhenDelegated=”true”, as follows:

<httpErrors lockAttributes="allowAbsolutePathsWhenDelegated,defaultPath" allowAbsolutePathsWhenDelegated="true">
   ....
   ....
</httpErrors>