301永久移动,使用python fcgi

301永久移动,使用python fcgi,python,fastcgi,Python,Fastcgi,我正在使用一个相当便宜的共享托管帐户,试图使用部署flask应用程序。我已经将代码和fcgi脚本放在~/domains/mini中 fcgi脚本是: #!/home/username/anaconda2/bin/python import sys,os from flup.server.fcgi import WSGIServer sys.path.insert(0, '/username/domains/mini') from myflaskapp.settings import Config

我正在使用一个相当便宜的共享托管帐户,试图使用部署flask应用程序。我已经将代码和fcgi脚本放在~/domains/mini中

fcgi脚本是:

#!/home/username/anaconda2/bin/python
import sys,os
from flup.server.fcgi import WSGIServer
sys.path.insert(0, '/username/domains/mini')
from myflaskapp.settings import Config, SharedConfig
from myflaskapp.app import create_app

if __name__ == '__main__':
    app = create_app(SharedConfig)
    WSGIServer(app).run()
我已经到了最后一步,在命令行测试时:

[~/domains/mini]# ./mini.fcgi
....
Status: 301 MOVED PERMANENTLY
Content-Type: text/html; charset=utf-8
Content-Length: 241
Location: http://localhost/

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
&lt;title&gt;Redirecting...&lt;/title&gt;
<h1>Redirecting...</h1>
<p>You should be redirected automatically to target URL: <a href="http://localhost/">http://localhost/</a>. 
[~/domains/mini]#/mini.fcgi
....
状态:301永久移动
内容类型:text/html;字符集=utf-8
内容长度:241
地点:http://localhost/
标题编辑…/title
重定向。。。
您应该自动重定向到目标URL:。

托管公司没有帮我做这件事。有没有关于下一步该怎么做的想法?

我最近遇到了同样的问题,并通过降级我的Werkzeug软件包来解决它

pip install Werkzeug==0.9.6

我不清楚这有什么帮助,但我的Werkzeug版本(0.11.10)似乎与Flask(0.11.1)不兼容。

为什么路径前有一个瓷砖?我尝试了几种不同的方法,但得到了相同的输出。还尝试了/domains/mini