python - Multiple applications on one server in Flask -
currently server construction looks this:
/srv/http/: index.html projects/: app1/ app2/ appetc/
the index.html
flask application, changed static webpage, since fit needs.
what want have multiple applications (in project
folder) found @ urls located @ in file structure. i.e.
app1: http://example.com/app1 app2: http://example.com/app2 appetc: http://example.com/appetc
currently doesn't work. can navigate home page of apps @ proper url, if click on link (since it's flask app) acts it's running on root of server.
i do have root access server , able edit apache configuration files, do not have ability create more subdomains (my dns provider limits me, , @ limit). additionally, not set on layout. in transition phase can restructure applications want.
the documentation provides strategies running multiple flask applications, using middleware werkzeug:
from werkzeug.wsgi import dispatchermiddleware frontend_app import application frontend backend_app import application backend application = dispatchermiddleware(frontend, { '/backend': backend })
python flask
No comments:
Post a Comment