summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2005-11-07 14:39:13 +0000
committerAdrian Holovaty <adrian@holovaty.com>2005-11-07 14:39:13 +0000
commit54c3367a6301f7f7978727aee92edbdc98b80dee (patch)
tree74843e7e464cb61bff32d7a97e19c44f36e9a373 /docs
parentc6ef1e0588f157fac91c441453780202fa1e4f1a (diff)
Updated install.txt and modpython.txt to note required Apache and mod_python versions. Also gave full example for Apache config
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1123 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
-rw-r--r--docs/install.txt2
-rw-r--r--docs/modpython.txt23
2 files changed, 23 insertions, 2 deletions
diff --git a/docs/install.txt b/docs/install.txt
index b18d26d5c8..40366e0228 100644
--- a/docs/install.txt
+++ b/docs/install.txt
@@ -15,7 +15,7 @@ mod_python is similar to mod_perl -- it embeds Python within Apache and loads
Python code into memory when the server starts. Code stays in memory throughout
the life of an Apache process, which leads to significant performance gains
over other server arrangements. Make sure you have Apache installed, with the
-mod_python module activated.
+mod_python module activated. Django requires Apache 2.x and mod_python 3.x.
See `How to use Django with mod_python`_ for information on how to configure
mod_python once you have it installed.
diff --git a/docs/modpython.txt b/docs/modpython.txt
index 13377ad2dd..b89eda9184 100644
--- a/docs/modpython.txt
+++ b/docs/modpython.txt
@@ -10,6 +10,8 @@ Python code into memory when the server starts. Code stays in memory throughout
the life of an Apache process, which leads to significant performance gains over
other server arrangements.
+Django requires Apache 2.x and mod_python 3.x.
+
.. _Apache: http://httpd.apache.org/
.. _mod_python: http://www.modpython.org/
.. _mod_perl: http://perl.apache.org/
@@ -129,7 +131,26 @@ particular part of the site::
SetHandler None
</Location>
-Just change ``Location`` to the root URL of your media files.
+Just change ``Location`` to the root URL of your media files. You can also use
+``<LocationMatch>`` to match a regular expression.
+
+This example sets up Django at the site root but explicitly disables Django for
+the ``media`` subdirectory and any URL that ends with ``.jpg``, ``.gif`` or
+``.png``::
+
+ <Location "/">
+ SetHandler python-program
+ PythonHandler django.core.handlers.modpython
+ SetEnv DJANGO_SETTINGS_MODULE myproject.settings
+ </Location>
+
+ <Location "media">
+ SetHandler None
+ </Location>
+
+ <LocationMatch "\.(jpg|gif|png)$">
+ SetHandler None
+ </Location>
Note that the Django development server automagically serves admin media files,
but this is not the case when you use any other server arrangement.