簡體   English   中英

Windows Server 2012上IIS 8上的燒瓶安裝

[英]Flask Setup on IIS 8 on Windows Server 2012

我正在嘗試在Windows Server 2012上托管Flask Web應用程序。我已經按照http://developer.e-power.com.kh/publish-flask-on-iis/中的說明進行操作,起初它沒有工作,但是啟用HTTP激活Windows功能后,瀏覽http:// localhost:80 /后,我可以得到以下錯誤消息:

Error occurred while reading WSGI handler:
Traceback (most recent call last):
File "c:\inetpub\wwwroot\convnet\wfastcgi.py", line 711, in main env, handler = read_wsgi_handler(response.physical_path) 
File "c:\inetpub\wwwroot\convnet\wfastcgi.py", line 568, in read_wsgi_handler return env, get_wsgi_handler(handler_name) 
File "c:\inetpub\wwwroot\convnet\wfastcgi.py", line 551, in get_wsgi_handler raise ValueError('"%s" could not be imported' % handler_name) 
ValueError: "app.app" could not be imported 
StdOut: 
StdErr: 

按照上面鏈接中的說明自動生成的web.config文件是:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <handlers>
            <add name="FlaskHandler" path="*" verb="*" modules="FastCgiModule" scriptProcessor="C:\Python27\python.exe|c:\inetpub\wwwroot\convnet\wfastcgi.py" resourceType="Unspecified" requireAccess="Script" />
        </handlers>
    </system.webServer>
</configuration>

確保您有可從app.py導入的應用程序對象。 看起來找不到它:

ValueError: "app.app" could not be imported 

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM