在App Service(Windows)中部署Flask应用时的注意事项:
● 添加Python扩展插件,Python 3.6.4 x64:
●● 配置 FastCGI 处理程序,添加Web.config:
FastCGI 是在请求级别工作的接口。 IIS 接收传入的连接,并将每个请求转发到在一个或多个持久 Python 进程中运行的 WSGI 应用。将应用的 web.config 文件修改为,在 PythonHandler
键中添加 python.exe 和 wfastcgi.py 的完整路径。修改 web.config 中的 PythonHandler
条目,让路径与 Python 安装位置一致
<system.webServer> <handlers> <add name="PythonHandler" path="*" verb="*" modules="FastCgiModule" scriptProcessor="c:\python36-32\python.exe|c:\python36-32\wfastcgi.py" resourceType="Unspecified" requireAccess="Script"/> </handlers> </system.webServer>
09-05 01:58