summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraham Dumpleton <Graham.Dumpleton@gmail.com>2022-10-04 10:15:14 +1100
committerGitHub <noreply@github.com>2022-10-04 10:15:14 +1100
commitac1a8e6cfffda292f688de1a6628835887be6e63 (patch)
tree180b385f9b038f60f7dcf68a99895e099c279730
parent7fba9934e8631cdc08d48bbc2983598b4586db80 (diff)
parent21ba69a627ff71d7236bb133e5dd3fbc99098960 (diff)
downloadmod_wsgi-ac1a8e6cfffda292f688de1a6628835887be6e63.tar.gz
Merge pull request #797 from bteague/patch-1master
Add details about preserving matched path components when using WSGIScriptAliasMatch.
-rw-r--r--docs/configuration-directives/WSGIScriptAliasMatch.rst12
1 files changed, 12 insertions, 0 deletions
diff --git a/docs/configuration-directives/WSGIScriptAliasMatch.rst b/docs/configuration-directives/WSGIScriptAliasMatch.rst
index 0d9c3ce..db757a3 100644
--- a/docs/configuration-directives/WSGIScriptAliasMatch.rst
+++ b/docs/configuration-directives/WSGIScriptAliasMatch.rst
@@ -28,6 +28,18 @@ 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 the WSGI application.
+
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.