From 7f8588d22ea3b53ba55d05922b67e7b3a0a7c91c Mon Sep 17 00:00:00 2001 From: Ian Lee Date: Sat, 7 Feb 2015 13:13:07 -0800 Subject: [PATCH] Documented how to use a non-root subdirectory with mod_wsgi. --- docs/howto/deployment/wsgi/modwsgi.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/howto/deployment/wsgi/modwsgi.txt b/docs/howto/deployment/wsgi/modwsgi.txt index 620a20f5c91..4e7d627b317 100644 --- a/docs/howto/deployment/wsgi/modwsgi.txt +++ b/docs/howto/deployment/wsgi/modwsgi.txt @@ -112,6 +112,14 @@ use ``WSGIPythonPath``; instead you should use the ``python-path`` option to WSGIDaemonProcess example.com python-path=/path/to/mysite.com:/path/to/venv/lib/python2.7/site-packages WSGIProcessGroup example.com +If you want to serve your project in a subdirectory +(``http://example.com/mysite`` in this example), you can add ``WSGIScriptAlias`` +to the configuration above: + +.. code-block:: apache + + WSGIScriptAlias /mysite /path/to/mysite.com/mysite/wsgi.py process-group=example.com + See the official mod_wsgi documentation for `details on setting up daemon mode`_.