diff docs/setup.rst @ 7653:9bae11163c31 stable

docs: outline the challenges of specifying a locale for services (Issue #340) Trying to embed the most essential parts of http://blog.dscpl.com.au/2014/09/setting-lang-and-lcall-when-using.html and https://modwsgi.readthedocs.io/en/develop/configuration-directives/WSGIDaemonProcess.html . (some rewording by Thomas De Schampheleire)
author Mads Kiilerich <mads@kiilerich.com>
date Wed, 01 May 2019 00:57:04 +0200
parents 759d5143042c
children e4f27ab7cbea
line wrap: on
line diff
--- a/docs/setup.rst	Fri May 10 21:24:21 2019 +0200
+++ b/docs/setup.rst	Wed May 01 00:57:04 2019 +0200
@@ -539,6 +539,12 @@
 - Add the necessary ``WSGI*`` directives to the Apache Virtual Host configuration
   file, like in the example below. Notice that the WSGI dispatch script created
   above is referred to with the ``WSGIScriptAlias`` directive.
+  The default locale settings Apache provides for web services are often not
+  adequate, with `C` as the default language and `ASCII` as the encoding.
+  Instead, use the ``lang`` parameter of ``WSGIDaemonProcess`` to specify a
+  suitable locale. See also the :ref:`overview` section and the
+  `WSGIDaemonProcess documentation`_.
+
   Apache will by default run as a special Apache user, on Linux systems
   usually ``www-data`` or ``apache``. If you need to have the repositories
   directory owned by a different user, use the user and group options to
@@ -549,7 +555,7 @@
   .. code-block:: apache
 
       WSGIDaemonProcess kallithea processes=5 threads=1 maximum-requests=100 \
-          python-home=/srv/kallithea/venv
+          python-home=/srv/kallithea/venv lang=C.UTF-8
       WSGIProcessGroup kallithea
       WSGIScriptAlias / /srv/kallithea/dispatch.wsgi
       WSGIPassAuthorization On
@@ -558,7 +564,7 @@
 
   .. code-block:: apache
 
-      WSGIDaemonProcess kallithea processes=5 threads=1 maximum-requests=100
+      WSGIDaemonProcess kallithea processes=5 threads=1 maximum-requests=100 lang=en_US.utf8
       WSGIProcessGroup kallithea
       WSGIScriptAlias / /srv/kallithea/dispatch.wsgi
       WSGIPassAuthorization On
@@ -583,3 +589,4 @@
 .. _Redis: http://redis.io/
 .. _mercurial-server: http://www.lshift.net/mercurial-server.html
 .. _PublishingRepositories: https://www.mercurial-scm.org/wiki/PublishingRepositories
+.. _WSGIDaemonProcess documentation: https://modwsgi.readthedocs.io/en/develop/configuration-directives/WSGIDaemonProcess.html