comparison 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
comparison
equal deleted inserted replaced
7652:759d5143042c 7653:9bae11163c31
537 application = loadapp('config:' + ini) 537 application = loadapp('config:' + ini)
538 538
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
545 WSGIDaemonProcess to set the name of the user and group. 551 WSGIDaemonProcess to set the name of the user and group.
546 552
547 Once again, check that all paths are correctly specified. 553 Once again, check that all paths are correctly specified.
548 554
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
556 562
557 Or if using a dispatcher WSGI script with proper virtualenv activation: 563 Or if using a dispatcher WSGI script with proper virtualenv activation:
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
565 571
566 572
581 .. _Celery documentation: http://docs.celeryproject.org/en/latest/getting-started/index.html 587 .. _Celery documentation: http://docs.celeryproject.org/en/latest/getting-started/index.html
582 .. _RabbitMQ: http://www.rabbitmq.com/ 588 .. _RabbitMQ: http://www.rabbitmq.com/
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