diff options
author | Bryan Teague <bryant@sandiego.edu> | 2022-10-03 15:35:19 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-03 15:35:19 -0700 |
commit | 34229046a7a8294fa0a4baf6c30cc03b70967755 (patch) | |
tree | aefb9203f42a097a89d9a12ef11eb00b9a5a16c5 | |
parent | 7fba9934e8631cdc08d48bbc2983598b4586db80 (diff) | |
download | mod_wsgi-34229046a7a8294fa0a4baf6c30cc03b70967755.tar.gz |
Update WSGIScriptAliasMatch.rst
I have been searching for 2 days on this issue. I finally found the answer here: https://serverfault.com/questions/555955/can-i-configure-apache-mod-wsgi-so-that-the-alias-url-path-is-not-stripped-befor It resolved my issue. I would have been good to see it in the documentation. I would have saved about 14 hours of banging my head against the wall.
-rw-r--r-- | docs/configuration-directives/WSGIScriptAliasMatch.rst | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/docs/configuration-directives/WSGIScriptAliasMatch.rst b/docs/configuration-directives/WSGIScriptAliasMatch.rst index 0d9c3ce..b137357 100644 --- a/docs/configuration-directives/WSGIScriptAliasMatch.rst +++ b/docs/configuration-directives/WSGIScriptAliasMatch.rst @@ -28,6 +28,17 @@ doing redirects. This is because the substitution of the matched sub pattern from the left hand side back into the right hand side is often critical. +If you are using WSGIScriptAliasMatch to pass to a wsgi handler, and you need +to preserve the path. You can do the following: + + WSGIScriptAlias /api /var/www/mysite.com/apache/django.wsgi/api + +A more complicated example: + + WSGIScriptAliasMatch "^/(admin|files|photologue)" /projects/Media/wsgi_handler.py/$1 + +This will keep the URL match from being stripped off the URL by the time it reaches Django. + If you think you need to use WSGIScriptAliasMatch, you probably don't really. If you really really think you need it, then check on the mod_wsgi mailing list about how to use it properly. |