I have a flask app running on port 5000 but that port is blocked on my server and I can't unblock it. Ideally I'd like to just run the app on www.mywebsite.com/flaskapp, is this possible by just configuring apache2? The rest of the server is essentially a wordpress website and I'd like to not destroy that to run this flask app.
1 Answer
I assume you're using mod_wsgi on Apache2.
If you have a graphing app you only want to run on /graph, add this to your virtual host config:
WSGIScriptAlias /graph /var/www/graph/graph.wsgi
Navigating to /graph and it'll run the .wsgi you've written for it.
-
Do I not need to put that as a separate site with a seperate conf file?– CragglesAug 26, 2016 at 17:44
-
-
For a flask web app, it's just importing your python code for it. The standard implementation being: "from graph import graph_app as application" The config goes in whichever virtual host you're configuring the app for.– L MartinAug 28, 2016 at 19:36