I have a problem with mod_wsgi and flask on Windows 10. When I start app from console with "flusk run" it's work, but from apache I've got an error INET_E_REDIRECT_FAILED
Here is my directory structure:
- E:\www\test.wsgi
- E:\www\test\app\__init__.py
test.wsgi:
import sys
sys.path.insert(0, 'E:/www/')
from test import app as application
__init__.py:
from flask import Flask
app = Flask(__name__)
app.debug = True
@app.route('/')
@app.route('/index')
def hello_world():
return 'Hello Flask under Apache!'
if __name__ == "__main__":
app.run()
apache.conf:
WSGIScriptAlias /test "E:/www/test.wsgi"
<Directory "E:/www/test/">
WSGIApplicationGroup %{GLOBAL}
AllowOverride none
Require all granted
</Directory>
get from apache access.log:
"GET /test/ HTTP/1.1" 308 262