mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Fixed a whole bunch of small docs typos, errors, and ommissions.
Fixes #8358, #8396, #8724, #9043, #9128, #9247, #9267, #9267, #9375, #9409, #9414, #9416, #9446, #9454, #9464, #9503, #9518, #9533, #9657, #9658, #9683, #9733, #9771, #9835, #9836, #9837, #9897, #9906, #9912, #9945, #9986, #9992, #10055, #10084, #10091, #10145, #10245, #10257, #10309, #10358, #10359, #10424, #10426, #10508, #10531, #10551, #10635, #10637, #10656, #10658, #10690, #10699, #19528. Thanks to all the respective authors of those tickets. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10371 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
d2a8bc5b40
commit
c6c25adf6d
50 changed files with 551 additions and 262 deletions
|
@ -17,14 +17,22 @@ performance gains over other server arrangements.
|
|||
Django requires Apache 2.x and mod_python 3.x, and you should use Apache's
|
||||
`prefork MPM`_, as opposed to the `worker MPM`_.
|
||||
|
||||
You may also be interested in :ref:`How to use Django with FastCGI, SCGI, or
|
||||
AJP <howto-deployment-fastcgi>`.
|
||||
.. seealso::
|
||||
|
||||
* Apache is a big, complex animal, and this document only scratches the
|
||||
surface of what Apache can do. If you need more advanced information about
|
||||
Apache, there's no better source than `Apache's own official
|
||||
documentation`_
|
||||
|
||||
* You may also be interested in :ref:`How to use Django with FastCGI, SCGI,
|
||||
or AJP <howto-deployment-fastcgi>`.
|
||||
|
||||
.. _Apache: http://httpd.apache.org/
|
||||
.. _mod_python: http://www.modpython.org/
|
||||
.. _mod_perl: http://perl.apache.org/
|
||||
.. _prefork MPM: http://httpd.apache.org/docs/2.2/mod/prefork.html
|
||||
.. _worker MPM: http://httpd.apache.org/docs/2.2/mod/worker.html
|
||||
.. _apache's own official documentation: http://httpd.apache.org/docs/
|
||||
|
||||
Basic configuration
|
||||
===================
|
||||
|
@ -52,15 +60,15 @@ Django mod_python handler." It passes the value of :ref:`DJANGO_SETTINGS_MODULE
|
|||
.. versionadded:: 1.0
|
||||
The ``PythonOption django.root ...`` is new in this version.
|
||||
|
||||
Because mod_python does not know we are
|
||||
serving this site from underneath the ``/mysite/`` prefix, this value needs to
|
||||
be passed through to the mod_python handler in Django, via the ``PythonOption
|
||||
django.root ...`` line. The value set on that line (the last item) should
|
||||
match the string given in the ``<Location ...>`` directive. The effect of this
|
||||
is that Django will automatically strip the ``/mysite`` string from the front
|
||||
of any URLs before matching them against your URLconf patterns. If you later
|
||||
move your site to live under ``/mysite2``, you will not have to change anything
|
||||
except the ``django.root`` option in the config file.
|
||||
Because mod_python does not know we are serving this site from underneath the
|
||||
``/mysite/`` prefix, this value needs to be passed through to the mod_python
|
||||
handler in Django, via the ``PythonOption django.root ...`` line. The value set
|
||||
on that line (the last item) should match the string given in the ``<Location
|
||||
...>`` directive. The effect of this is that Django will automatically strip the
|
||||
``/mysite`` string from the front of any URLs before matching them against your
|
||||
URLconf patterns. If you later move your site to live under ``/mysite2``, you
|
||||
will not have to change anything except the ``django.root`` option in the config
|
||||
file.
|
||||
|
||||
When using ``django.root`` you should make sure that what's left, after the
|
||||
prefix has been removed, begins with a slash. Your URLconf patterns that are
|
||||
|
@ -97,6 +105,10 @@ setting the Python path for interactive usage. Whenever you try to import
|
|||
something, Python will run through all the directories in ``sys.path`` in turn,
|
||||
from first to last, and try to import from each directory until one succeeds.
|
||||
|
||||
Make sure that your Python source files' permissions are set such that the
|
||||
Apache user (usually named ``apache`` or ``httpd`` on most systems) will have
|
||||
read access to the files.
|
||||
|
||||
An example might make this clearer. Suppose you have some applications under
|
||||
``/usr/local/django-apps/`` (for example, ``/usr/local/django-apps/weblog/`` and
|
||||
so forth), your settings file is at ``/var/www/mysite/settings.py`` and you have
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue