##// END OF EJS Templates
docs: improve mod_wsgi documentation (Issue #203)...
Mads Kiilerich -
r5752:8c479b27 stable
parent child Browse files
Show More
@@ -718,6 +718,12 b" that, you'll need to:"
718
718
719 a2enmod wsgi
719 a2enmod wsgi
720
720
721 - Add global Apache configuration to tell mod_wsgi that Python only will be
722 used in the WSGI processes and shouldn't be initialized in the Apache
723 processes::
724
725 WSGIRestrictEmbedded On
726
721 - Create a wsgi dispatch script, like the one below. Make sure you
727 - Create a wsgi dispatch script, like the one below. Make sure you
722 check that the paths correctly point to where you installed Kallithea
728 check that the paths correctly point to where you installed Kallithea
723 and its Python Virtual Environment.
729 and its Python Virtual Environment.
@@ -730,8 +736,9 b' Here is a sample excerpt from an Apache '
730 .. code-block:: apache
736 .. code-block:: apache
731
737
732 WSGIDaemonProcess kallithea \
738 WSGIDaemonProcess kallithea \
733 processes=1 threads=4 \
739 threads=4 \
734 python-path=/srv/kallithea/venv/lib/python2.7/site-packages
740 python-home=/srv/kallithea/venv
741 WSGIProcessGroup kallithea
735 WSGIScriptAlias / /srv/kallithea/dispatch.wsgi
742 WSGIScriptAlias / /srv/kallithea/dispatch.wsgi
736 WSGIPassAuthorization On
743 WSGIPassAuthorization On
737
744
@@ -739,13 +746,15 b' Or if using a dispatcher WSGI script wit'
739
746
740 .. code-block:: apache
747 .. code-block:: apache
741
748
742 WSGIDaemonProcess kallithea processes=1 threads=4
749 WSGIDaemonProcess kallithea threads=4
750 WSGIProcessGroup kallithea
743 WSGIScriptAlias / /srv/kallithea/dispatch.wsgi
751 WSGIScriptAlias / /srv/kallithea/dispatch.wsgi
744 WSGIPassAuthorization On
752 WSGIPassAuthorization On
745
753
746 .. note::
754 Apache will by default run as a special Apache user, on Linux systems
747 When running apache as root, please make sure it doesn't run Kallithea as
755 usually ``www-data`` or ``apache``. If you need to have the repositories
748 root, for examply by adding: ``user=www-data group=www-data`` to the configuration.
756 directory owned by a different user, use the user and group options to
757 WSGIDaemonProcess to set the name of the user and group. """
749
758
750 .. note::
759 .. note::
751 If running Kallithea in multiprocess mode,
760 If running Kallithea in multiprocess mode,
@@ -766,11 +775,11 b' Example WSGI dispatch script:'
766 import site
775 import site
767 site.addsitedir("/srv/kallithea/venv/lib/python2.7/site-packages")
776 site.addsitedir("/srv/kallithea/venv/lib/python2.7/site-packages")
768
777
769 from paste.deploy import loadapp
778 ini = '/srv/kallithea/my.ini'
770 from paste.script.util.logging_config import fileConfig
779 from paste.script.util.logging_config import fileConfig
771
780 fileConfig(ini)
772 fileConfig('/srv/kallithea/my.ini')
781 from paste.deploy import loadapp
773 application = loadapp('config:/srv/kallithea/my.ini')
782 application = loadapp('config:' + ini)
774
783
775 Or using proper virtualenv activation:
784 Or using proper virtualenv activation:
776
785
General Comments 0
You need to be logged in to leave comments. Login now