Open damooo opened 5 years ago
Use:
ProxyPass /my_api/ http://docker.example.com:8002/my_api/
and then in the image when running mod_wsgi-express
use the --mount-point /my_api/
option.
I have used a trailing slash on everything as I can't remember if there is a limitation with leaving it off in this case. Try with and without and see if there are any gotchas that I can't remember.
If you must be able to accept without a trailing slash on the front end, add a RewriteRule
which redirects URL without training slash to have trailing slash, which would then match the ProxyPass
.
hello @GrahamDumpleton , when we server through mod_wsgi, apache inside docker, and setup a proxy throgh frontend Apache to this docker, every thing works as expected if it is mounted at root on front-end apache in your article http://blog.dscpl.com.au/2015/06/proxying-to-python-web-application.html , there are ways specified for modifying forwarded headers like scheme, and port.
but if proxied like below, with custom mount path
then url reconstruction inside docker image not working, as SCRIPT_NAME for wsgi environ doesn't preserve frontend's mount path. what is recommonded way to do this?