[Flask] app.route not found serving applicaiton w/Apache & mod_wsgi

Dunlap, Zachariah ZDunlap at ap.org
Mon Oct 19 17:24:27 CEST 2015

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.

I have a simple web app which responds to an HTML form containing some selections that return links for Amazon S3 folders. I've used JavaScript to return the results on the same page to make it an easier experience for users (this is an internal only app, it won't go out to the live web).

The app is basically structured like this (edited to keep this message as short as possible):

@app.route('/generate_urls', methods = ['GET', 'POST'])
def generate_urls():

def index():
  return render_template('index.html')

if __name__ == '__main__':
  app.run(host='', port=1234)

My folder structure for the app looks like this:

app folder
--static (folder)
----css (folder)
----js (folder)

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:

Not Found
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.

msk dccc60c6d2c3a6438f0cf467d9a4938
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/flask/attachments/20151019/b503ff1f/attachment.html>

More information about the Flask mailing list