Show More
@@ -37,6 +37,41 b' environment used for running Kallithea.' | |||||
37 | We recommend using virtualenv for installing Kallithea. |
|
37 | We recommend using virtualenv for installing Kallithea. | |
38 |
|
38 | |||
39 |
|
39 | |||
|
40 | Locale environment | |||
|
41 | ------------------ | |||
|
42 | ||||
|
43 | In order to ensure a correct functioning of Kallithea with respect to non-ASCII | |||
|
44 | characters in user names, file paths, commit messages, etc., it is very | |||
|
45 | important that Kallithea is run with a correct `locale` configuration. | |||
|
46 | ||||
|
47 | On Unix, environment variables like ``LANG`` or ``LC_ALL`` can specify a language (like | |||
|
48 | ``en_US``) and encoding (like ``UTF-8``) to use for code points outside the ASCII | |||
|
49 | range. The flexibility of supporting multiple encodings of Unicode has the flip | |||
|
50 | side of having to specify which encoding to use - especially for Mercurial. | |||
|
51 | ||||
|
52 | It depends on the OS distribution and system configuration which locales are | |||
|
53 | available. For example, some Docker containers based on Debian default to only | |||
|
54 | supporting the ``C`` language, while other Linux environments have ``en_US`` but not | |||
|
55 | ``C``. The ``locale -a`` command will show which values are available on the | |||
|
56 | current system. Regardless of the actual language, you should normally choose a | |||
|
57 | locale that has the ``UTF-8`` encoding (note that spellings ``utf8``, ``utf-8``, | |||
|
58 | ``UTF8``, ``UTF-8`` are all referring to the same thing) | |||
|
59 | ||||
|
60 | For technical reasons, the locale configuration **must** be provided in the | |||
|
61 | environment in which Kallithea runs - it cannot be specified in the ``.ini`` file. | |||
|
62 | How to practically do this depends on the web server that is used and the way it | |||
|
63 | is started. For example, gearbox is often started by a normal user, either | |||
|
64 | manually or via a script. In this case, the required locale environment | |||
|
65 | variables can be provided directly in that user's environment or in the script. | |||
|
66 | However, web servers like Apache are often started at boot via an init script or | |||
|
67 | service file. Modifying the environment for this case would thus require | |||
|
68 | root/administrator privileges. Moreover, that environment would dictate the | |||
|
69 | settings for all web services running under that web server, Kallithea being | |||
|
70 | just one of them. Specifically in the case of Apache with ``mod_wsgi``, the | |||
|
71 | locale can be set for a specific service in its ``WSGIDaemonProcess`` directive, | |||
|
72 | using the ``lang`` parameter. | |||
|
73 | ||||
|
74 | ||||
40 | Installation methods |
|
75 | Installation methods | |
41 | -------------------- |
|
76 | -------------------- | |
42 |
|
77 |
@@ -539,6 +539,12 b" that, you'll need to:" | |||||
539 | - Add the necessary ``WSGI*`` directives to the Apache Virtual Host configuration |
|
539 | - Add the necessary ``WSGI*`` directives to the Apache Virtual Host configuration | |
540 | file, like in the example below. Notice that the WSGI dispatch script created |
|
540 | file, like in the example below. Notice that the WSGI dispatch script created | |
541 | above is referred to with the ``WSGIScriptAlias`` directive. |
|
541 | above is referred to with the ``WSGIScriptAlias`` directive. | |
|
542 | The default locale settings Apache provides for web services are often not | |||
|
543 | adequate, with `C` as the default language and `ASCII` as the encoding. | |||
|
544 | Instead, use the ``lang`` parameter of ``WSGIDaemonProcess`` to specify a | |||
|
545 | suitable locale. See also the :ref:`overview` section and the | |||
|
546 | `WSGIDaemonProcess documentation`_. | |||
|
547 | ||||
542 | Apache will by default run as a special Apache user, on Linux systems |
|
548 | Apache will by default run as a special Apache user, on Linux systems | |
543 | usually ``www-data`` or ``apache``. If you need to have the repositories |
|
549 | usually ``www-data`` or ``apache``. If you need to have the repositories | |
544 | directory owned by a different user, use the user and group options to |
|
550 | directory owned by a different user, use the user and group options to | |
@@ -549,7 +555,7 b" that, you'll need to:" | |||||
549 | .. code-block:: apache |
|
555 | .. code-block:: apache | |
550 |
|
556 | |||
551 | WSGIDaemonProcess kallithea processes=5 threads=1 maximum-requests=100 \ |
|
557 | WSGIDaemonProcess kallithea processes=5 threads=1 maximum-requests=100 \ | |
552 | python-home=/srv/kallithea/venv |
|
558 | python-home=/srv/kallithea/venv lang=C.UTF-8 | |
553 | WSGIProcessGroup kallithea |
|
559 | WSGIProcessGroup kallithea | |
554 | WSGIScriptAlias / /srv/kallithea/dispatch.wsgi |
|
560 | WSGIScriptAlias / /srv/kallithea/dispatch.wsgi | |
555 | WSGIPassAuthorization On |
|
561 | WSGIPassAuthorization On | |
@@ -558,7 +564,7 b" that, you'll need to:" | |||||
558 |
|
564 | |||
559 | .. code-block:: apache |
|
565 | .. code-block:: apache | |
560 |
|
566 | |||
561 | WSGIDaemonProcess kallithea processes=5 threads=1 maximum-requests=100 |
|
567 | WSGIDaemonProcess kallithea processes=5 threads=1 maximum-requests=100 lang=en_US.utf8 | |
562 | WSGIProcessGroup kallithea |
|
568 | WSGIProcessGroup kallithea | |
563 | WSGIScriptAlias / /srv/kallithea/dispatch.wsgi |
|
569 | WSGIScriptAlias / /srv/kallithea/dispatch.wsgi | |
564 | WSGIPassAuthorization On |
|
570 | WSGIPassAuthorization On | |
@@ -583,3 +589,4 b' the ``init.d`` directory of the Kallithe' | |||||
583 | .. _Redis: http://redis.io/ |
|
589 | .. _Redis: http://redis.io/ | |
584 | .. _mercurial-server: http://www.lshift.net/mercurial-server.html |
|
590 | .. _mercurial-server: http://www.lshift.net/mercurial-server.html | |
585 | .. _PublishingRepositories: https://www.mercurial-scm.org/wiki/PublishingRepositories |
|
591 | .. _PublishingRepositories: https://www.mercurial-scm.org/wiki/PublishingRepositories | |
|
592 | .. _WSGIDaemonProcess documentation: https://modwsgi.readthedocs.io/en/develop/configuration-directives/WSGIDaemonProcess.html |
General Comments 0
You need to be logged in to leave comments.
Login now