librelist archives

« back to archive

Develop flaskr on apache, 404 ERROR

Develop flaskr on apache, 404 ERROR

From:
梁林
Date:
2013-09-29 @ 03:13
Dear all,    I am new to flask and apache, I follow the flask doc did the 
flaskr demo, Now I want to develop it on apache2.4 with mod_wsgi (I'm 
using windows 7).


    I'm sure loadModule mod_wsgi work, the problem I think is the apache config.


I just add the following lines to apache httpd.conf as the flask docs 
said. "D:/flaskr" is the code of flaskr 
demo.<http://flask.pocoo.org/docs/deploying/mod_wsgi/>
--------------------------------------------------------------------------------
    WSGIScriptAlias /flaskr "D:/phpenvs/xampp/htdocs/flaskr.wsgi"     
<Directory "D:/flaskr">         Order deny,allow         Allow from all

</Directory>--------------------------------------------------------------------------------
here is my flaske.wsgi------------------------------------import sys 
sys.path.insert(0,'D:\\flaskr') from flaskr import 
app-----------------------------------
When I visited <http://localhost/flaskr>, Only 404 Error return.I had 
search the internet but can not find the error, any body can help ?Thank 
you very much.