mirror of
https://github.com/django/django.git
synced 2025-07-05 02:09:13 +00:00
magic-removal: Proofread docs/modpython.txt
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2783 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
fd70055334
commit
1a3450ce76
@ -31,11 +31,11 @@ Then edit your ``httpd.conf`` file and add the following::
|
|||||||
<Location "/mysite/">
|
<Location "/mysite/">
|
||||||
SetHandler python-program
|
SetHandler python-program
|
||||||
PythonHandler django.core.handlers.modpython
|
PythonHandler django.core.handlers.modpython
|
||||||
SetEnv DJANGO_SETTINGS_MODULE myproject.settings
|
SetEnv DJANGO_SETTINGS_MODULE mysite.settings
|
||||||
PythonDebug On
|
PythonDebug On
|
||||||
</Location>
|
</Location>
|
||||||
|
|
||||||
...and replace ``myproject.settings`` with the Python path to your settings file.
|
...and replace ``mysite.settings`` with the Python path to your settings file.
|
||||||
|
|
||||||
This tells Apache: "Use mod_python for any URL at or under '/mysite/', using the
|
This tells Apache: "Use mod_python for any URL at or under '/mysite/', using the
|
||||||
Django mod_python handler." It passes the value of ``DJANGO_SETTINGS_MODULE``
|
Django mod_python handler." It passes the value of ``DJANGO_SETTINGS_MODULE``
|
||||||
@ -71,13 +71,13 @@ instance. Just use ``VirtualHost`` for that, like so::
|
|||||||
<VirtualHost *>
|
<VirtualHost *>
|
||||||
ServerName www.example.com
|
ServerName www.example.com
|
||||||
# ...
|
# ...
|
||||||
SetEnv DJANGO_SETTINGS_MODULE myproject.settings
|
SetEnv DJANGO_SETTINGS_MODULE mysite.settings
|
||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
|
|
||||||
<VirtualHost *>
|
<VirtualHost *>
|
||||||
ServerName www2.example.com
|
ServerName www2.example.com
|
||||||
# ...
|
# ...
|
||||||
SetEnv DJANGO_SETTINGS_MODULE myproject.other_settings
|
SetEnv DJANGO_SETTINGS_MODULE mysite.other_settings
|
||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
|
|
||||||
If you need to put two Django installations within the same ``VirtualHost``,
|
If you need to put two Django installations within the same ``VirtualHost``,
|
||||||
@ -89,13 +89,13 @@ mess things up. Use the ``PythonInterpreter`` directive to give different
|
|||||||
ServerName www.example.com
|
ServerName www.example.com
|
||||||
# ...
|
# ...
|
||||||
<Location "/something">
|
<Location "/something">
|
||||||
SetEnv DJANGO_SETTINGS_MODULE myproject.settings
|
SetEnv DJANGO_SETTINGS_MODULE mysite.settings
|
||||||
PythonInterpreter myproject
|
PythonInterpreter mysite
|
||||||
</Location>
|
</Location>
|
||||||
|
|
||||||
<Location "/otherthing">
|
<Location "/otherthing">
|
||||||
SetEnv DJANGO_SETTINGS_MODULE myproject.other_settings
|
SetEnv DJANGO_SETTINGS_MODULE mysite.other_settings
|
||||||
PythonInterpreter myproject_other
|
PythonInterpreter mysite_other
|
||||||
</Location>
|
</Location>
|
||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
|
|
||||||
@ -153,7 +153,7 @@ the ``media`` subdirectory and any URL that ends with ``.jpg``, ``.gif`` or
|
|||||||
<Location "/">
|
<Location "/">
|
||||||
SetHandler python-program
|
SetHandler python-program
|
||||||
PythonHandler django.core.handlers.modpython
|
PythonHandler django.core.handlers.modpython
|
||||||
SetEnv DJANGO_SETTINGS_MODULE myproject.settings
|
SetEnv DJANGO_SETTINGS_MODULE mysite.settings
|
||||||
</Location>
|
</Location>
|
||||||
|
|
||||||
<Location "media">
|
<Location "media">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user