This is a quick note on proxying a local python application (e.g. flask) to a subdirectory in Apache. This assumes that the file wsgi.py contains a WSGI application with the name application. Hence, wsgi:application.

Gunicorn

1
2
3
4
5
<Location /myapp/>
    ProxyPass http://127.0.0.1:8888/myapp/
    ProxyPassReverse http://127.0.0.1:8888/myapp/
    RequestHeader set SCRIPT_NAME "/myapp/"
</Location>
Read more...