I'm trying to deploy a Flask app on IIS (usually doing it on an Nginx/Gunicorn stack).
I'm working with Python 3.7 installed globaly, IIS 10 on Windows 10 pro.
wfastcgi enable
(and saved the output for the config file)wwwroot/myapp
web.config
file on that myapp
folder that looks like this:<configuration>
<system.webServer>
<handlers>
<add name="Python FastCGI"
path="*"
verb="*"
modules="FastCgiModule"
scriptProcessor="C:\Program Files\Python37\python.exe|C:\Program Files\Python37\Lib\site-packages\wfastcgi.py"
resourceType="Unspecified"
requireAccess="Script" />
</handlers>
</system.webServer>
<appSettings>
<!-- Required settings -->
<add key="WSGI_HANDLER" value="backend.wsgi.socketio" />
<add key="PYTHONPATH" value="C:\inetpub\wwwroot\myapp" />
</appSettings>
</configuration>
socketio
is the name of my Flask app, everything is ok when I run the wsgi file "standalone".
while testing app parameters, authentication step is OK, Authorization step raise a warning but not an error.
When I try to reach my app I get a 500 HTTP error with the folowing 0x80070585 IIS error code.
When I "break" my web.config
file (removing tag close for example), IIS tell me that the file is not well formed, so the file is reachable.
Since the error seems to come from the scriptProcessor, I double checked that both C:\Program Files\Python37\python.exe
and C:\Program Files\Python37\Lib\site-packages\wfastcgi.py
existed.
May IIS have access troubles?
I tried to inspect IIS logs, but that's not really verbose. I only have HTTP request logs.
Where should I dig to find more logs?
Thank you for yor help, note that I'm totally new to IIS and Microsoft servers, so I may have missed something big.
As Microsoft seems to give up with this stack, the only serious solution is to switch to an actively maintained solution such as Nginx or Apache. Thanx @Lex Li for the link to the communication.
User contributions licensed under CC BY-SA 3.0