[Flask] app.route not found serving applicaiton w/Apache & mod_wsgi
david at davidbaumgold.com
Mon Oct 19 17:36:35 CEST 2015
You say you’ve configured Apache to serve the application with a friendly URL. Does that mean that Apache is rewriting URLs for you? It could be that when you direct the user to /generate_urls on your application, Apache is rewriting it somehow so that Flask doesn’t see that it matches one of the URL routes you’ve set up. Without seeing more of your code, I can’t tell.
Also, have you configured Apache properly as per the documentation? http://flask.pocoo.org/docs/0.10/deploying/mod_wsgi/
From: Dunlap, Zachariah <zdunlap at ap.org>
Reply: Dunlap, Zachariah <zdunlap at ap.org>
Date: October 19, 2015 at 11:25:56 AM
To: flask at python.org <flask at python.org>
Subject: [Flask] app.route not found serving applicaiton w/Apache & mod_wsgi
Hello Flask mailing list,
I’m new to Flask so I have no doubt many of you will have great suggestions on how to fix my issue.
The app is basically structured like this (edited to keep this message as short as possible):
@app.route('/generate_urls', methods = ['GET', 'POST'])
BUNCH OF CODE HERE (REMOVED FOR BREVITY)
if __name__ == '__main__':
My folder structure for the app looks like this:
When I serve the app using the dev method, everything works great with no issues.
Now I’m working on using Apache and mod_wsgi to serve the app with a friendly URL and the homepage is served without issue once I’ve configured everything but when I attempt to use the form to create the links, I get an error from Apache that says:
The requested URL /generate_urls was not found on this server.
This leads me to believe it doesn’t know what to do with the @app.route() call.
I’m sure I’m missing something and may need to approach this differently, but I haven’t had much luck figuring that out on my own yet.
Any help with this would be greatly appreciated.
The information contained in this communication is intended for the use
of the designated recipients named above. If the reader of this
communication is not the intended recipient, you are hereby notified
that you have received this communication in error, and that any review,
dissemination, distribution or copying of this communication is strictly
prohibited. If you have received this communication in error, please
notify The Associated Press immediately by telephone at +1-212-621-1898
and delete this email. Thank you.
Flask mailing list
Flask at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Flask