I can successfully run the Flask jQuery example (as referred near bottom of Flask's "AJAX with jQuery" page.) It runs on the flask development server, and is accessible at http://localhost:5000
.
How do I proxy the page so that I can access the same app under http://localhost/jqueryexample
?
I added this to my Apache VirtualHost entry thinking it will do the trick:
ProxyPass /jqueryexample http://localhost:5000/
ProxyPassReverse /jqueryexample http://localhost:5000/
But the new URL gives the 404 error:
GET http://localhost/_add_numbers?a=6&b=2 404 (Not Found)
How can I get the example to run correctly under "canonical URL" (not sure if that's the right terminology)? Or, how to change the app or Apache configuration in order to get this jQuery example running for both URLs?
BTW, here's how you download and run the vanilla Flask jQuery example in question:
git clone http://github.com/mitsuhiko/flask
cd flask/examples/jqueryexample/
python jqueryexample.py