<html><head><style>body{font-family:Helvetica,Arial;font-size:13px}</style></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">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.</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">Also, have you configured Apache properly as per the documentation? <a href="http://flask.pocoo.org/docs/0.10/deploying/mod_wsgi/">http://flask.pocoo.org/docs/0.10/deploying/mod_wsgi/<br></a></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">David Baumgold</div> <div id="bloop_sign_1445268814678594048" class="bloop_sign"></div> <div class="airmail_ext_on" style="color:black"><br>From: <span style="color:black">Dunlap, Zachariah</span> <a href="mailto:zdunlap@ap.org"><zdunlap@ap.org></a><br>Reply: <span style="color:black">Dunlap, Zachariah</span> <a href="mailto:zdunlap@ap.org"><zdunlap@ap.org></a><br>Date: <span style="color:black">October 19, 2015 at 11:25:56 AM</span><br>To: <span style="color:black">flask@python.org</span> <a href="mailto:flask@python.org"><flask@python.org></a><br>Subject: <span style="color:black"> [Flask] app.route not found serving applicaiton w/Apache & mod_wsgi <br></span></div><br> <blockquote type="cite" class="clean_bq"><span><div lang="EN-US" link="blue" vlink="purple" xml:lang="EN-US"><div></div><div>






<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<title></title>


<div class="WordSection1">
<p class="MsoNormal">Hello Flask mailing list,</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">I’m new to Flask so I have no doubt many of
you will have great suggestions on how to fix my issue.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">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).</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">The app is basically structured like this
(edited to keep this message as short as possible):</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">@app.route('/generate_urls', methods = ['GET',
'POST'])</p>
<p class="MsoNormal">def generate_urls():</p>
<p class="MsoNormal">  BUNCH OF CODE HERE (REMOVED FOR
BREVITY)</p>
<p class="MsoNormal">  return RETURN_STUFF</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">@app.route('/')</p>
<p class="MsoNormal">def index():</p>
<p class="MsoNormal">  return
render_template('index.html')</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">if __name__ == '__main__':</p>
<p class="MsoNormal">  app.run(host='0.0.0.0', port=1234)</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">My folder structure for the app looks like
this:</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">app folder</p>
<p class="MsoNormal">--app_name.py</p>
<p class="MsoNormal">--static (folder)</p>
<p class="MsoNormal">----css (folder)</p>
<p class="MsoNormal">------css_file.css</p>
<p class="MsoNormal">----js (folder)</p>
<p class="MsoNormal">------js_file.js</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">When I serve the app using the dev method,
everything works great with no issues.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">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:</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">
<b><span style="font-size:24.0pt;font-family:"Times New Roman","serif";color:black">
Not Found</span></b></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:13.5pt;font-family:"Times New Roman","serif";color:black">
The requested URL /generate_urls was not found on this
server.</span></p>
<p class="MsoNormal">This leads me to believe it doesn’t know what
to do with the @app.route() call.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">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.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Any help with this would be greatly
appreciated.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Thanks,</p>
<p class="MsoNormal"><br>
Zach</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
</div>
<p>The information contained in this communication is intended for
the use<br>
of the designated recipients named above. If the reader of
this<br>
communication is not the intended recipient, you are hereby
notified<br>
that you have received this communication in error, and that any
review,<br>
dissemination, distribution or copying of this communication is
strictly<br>
prohibited. If you have received this communication in error,
please<br>
notify The Associated Press immediately by telephone at
+1-212-621-1898<br>
and delete this email. Thank you.<br>
[IP_US_DISC]</p>
<br>
<p>msk dccc60c6d2c3a6438f0cf467d9a4938</p>


_______________________________________________
<br>Flask mailing list
<br>Flask@python.org
<br>https://mail.python.org/mailman/listinfo/flask
<br></div></div></span></blockquote></body></html>