简体   繁体   中英

404 Flask Deploy in 2008R2 - iis7

I am using wfastcgi3.0 with python3.4.

Even though I strictly followed this guide in https://netdot.co/2015/03/09/flask-on-iis/

I still got 404.....

My webconfig:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <handlers>
            <add name="FlaskFastCGI" path="*" verb="*" modules="FastCgiModule" scriptProcessor="C:\Python34\python.exe|C:\Python34\Lib\site-packages\wfastcgi.py" resourceType="Unspecified" />
        </handlers>
    </system.webServer>
    <appSettings>
        <add key="PYTHONPATH" value="D:\app\FLASKTEST" />
        <add key="WSGI_HANDLER" value="myapp.app" />
    </appSettings>
</configuration>

myapp.py:

from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
    return "Hello from FastCGI via IIS!"
if __name__ == "__main__":
    app.run()

在此处输入图像描述

Use python version after 3.6 with iis.follow this post steps https://stackoverflow.com/a/59171787/11147346 .

assign the iis_iusrs and iusr permission to the site and python folder. and at the tim eof installation install the python for all users.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM