wamp version : 2.5 , 64 bit
python version : 3.5.2 , 64 bit
windows version: 10 ,64 bit
apache version: 2.4.9
mod_wsgi: 4.4.23
I am trying to make python and flask work in wamp , so I read online and it says get wsgi which I did get from from here i put it in the apache modules file in this dir: C:\wamp\bin\apache\apache2.4.9\modules
I edited my httpd.conf file and added the following:
LoadModule wsgi_module modules/mod_wsgi.so
WSGIPythonHome C:/Python35/
wamp was yellow in the begging but i figured it out all you had to do is stop the cgi module then instructions online say to make a virtual host so i did:
WSGIScriptAlias /flaskapp C:/wamp/www/flaskapp/flaskapp.wsgi<br>
<VirtualHost *>
ServerName localhost
Directory C:/wamp/www/flaskapp>
Require all granted
</Directory>
</VirtualHost>
it also says to make a .wsgi so i made a file i called flaskapp.wsgi it contains :
import sys
#Expand Python classes path with your app's path
sys.path.insert(0, 'C:/wamp/www/flaskapp')
from__init__ import app
#Put logging code (and imports) here ...
#Initialize WSGI app object
application = app
after all this it should work normally but whenever I go to localhost/flaskapp/__init__
.py I just get the same text in __init__
.py which is :
from flask import Flask, request
app = Flask(__ name__)
@app.route('/hello')
def hello_world():
return "Hello World"
if __ name__ == '__ main__':
app.run()
btw i have flask installed in my global env and python is set to work with all users and has access to PATH
i have tried everything so obviously something is wrong because its not working please if somebody knows help