Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
103e6cf2
Kaydet (Commit)
103e6cf2
authored
Şub 14, 2017
tarafından
Tim Graham
Kaydeden (comit)
GitHub
Şub 14, 2017
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #27823 -- Updated mod_wsgi example to use WSGIPythonHome.
üst
2f10216f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
21 deletions
+9
-21
modwsgi.txt
docs/howto/deployment/wsgi/modwsgi.txt
+9
-21
No files found.
docs/howto/deployment/wsgi/modwsgi.txt
Dosyayı görüntüle @
103e6cf2
...
@@ -34,6 +34,7 @@ also add the line ``Order deny,allow`` above it.
...
@@ -34,6 +34,7 @@ also add the line ``Order deny,allow`` above it.
.. code-block:: apache
.. code-block:: apache
WSGIScriptAlias / /path/to/mysite.com/mysite/wsgi.py
WSGIScriptAlias / /path/to/mysite.com/mysite/wsgi.py
WSGIPythonHome /path/to/venv
WSGIPythonPath /path/to/mysite.com
WSGIPythonPath /path/to/mysite.com
<Directory /path/to/mysite.com/mysite>
<Directory /path/to/mysite.com/mysite>
...
@@ -49,6 +50,10 @@ your project package (``mysite`` in this example). This tells Apache to serve
...
@@ -49,6 +50,10 @@ your project package (``mysite`` in this example). This tells Apache to serve
any request below the given URL using the WSGI application defined in that
any request below the given URL using the WSGI application defined in that
file.
file.
If you install your project's Python dependencies inside a `virtualenv`_, add
the path to the virtualenv using ``WSGIPythonHome``. See the `mod_wsgi
virtualenv guide`_ for more details.
The ``WSGIPythonPath`` line ensures that your project package is available for
The ``WSGIPythonPath`` line ensures that your project package is available for
import on the Python path; in other words, that ``import mysite`` works.
import on the Python path; in other words, that ``import mysite`` works.
...
@@ -61,6 +66,9 @@ for you; otherwise, you'll need to create it. See the :doc:`WSGI overview
...
@@ -61,6 +66,9 @@ for you; otherwise, you'll need to create it. See the :doc:`WSGI overview
documentation</howto/deployment/wsgi/index>` for the default contents you
documentation</howto/deployment/wsgi/index>` for the default contents you
should put in this file, and what else you can add to it.
should put in this file, and what else you can add to it.
.. _virtualenv: https://virtualenv.pypa.io/
.. _mod_wsgi virtualenv guide: https://modwsgi.readthedocs.io/en/develop/user-guides/virtual-environments.html
.. warning::
.. warning::
If multiple Django sites are run in a single mod_wsgi process, all of them
If multiple Django sites are run in a single mod_wsgi process, all of them
...
@@ -90,26 +98,6 @@ should put in this file, and what else you can add to it.
...
@@ -90,26 +98,6 @@ should put in this file, and what else you can add to it.
See the :ref:`unicode-files` section of the Unicode reference guide for
See the :ref:`unicode-files` section of the Unicode reference guide for
details.
details.
Using a ``virtualenv``
======================
If you install your project's Python dependencies inside a `virtualenv`_,
you'll need to add the path to this virtualenv's ``site-packages`` directory to
your Python path as well. To do this, add an additional path to your
``WSGIPythonPath`` directive, with multiple paths separated by a colon (``:``)
if using a UNIX-like system, or a semicolon (``;``) if using Windows. If any
part of a directory path contains a space character, the complete argument
string to ``WSGIPythonPath`` must be quoted:
.. code-block:: apache
WSGIPythonPath /path/to/mysite.com:/path/to/your/venv/lib/python3.X/site-packages
Make sure you give the correct path to your virtualenv, and replace
``python3.X`` with the correct Python version (e.g. ``python3.4``).
.. _virtualenv: https://virtualenv.pypa.io/
.. _daemon-mode:
.. _daemon-mode:
Using ``mod_wsgi`` daemon mode
Using ``mod_wsgi`` daemon mode
...
@@ -125,7 +113,7 @@ use ``WSGIPythonPath``; instead you should use the ``python-path`` option to
...
@@ -125,7 +113,7 @@ use ``WSGIPythonPath``; instead you should use the ``python-path`` option to
.. code-block:: apache
.. code-block:: apache
WSGIDaemonProcess example.com python-
path=/path/to/mysite.com:/path/to/venv/lib/python2.7/site-packages
WSGIDaemonProcess example.com python-
home=/path/to/venv python-path=/path/to/mysite.com
WSGIProcessGroup example.com
WSGIProcessGroup example.com
If you want to serve your project in a subdirectory
If you want to serve your project in a subdirectory
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment