From 230eafdf58c46b983936cbf4f70b712bbddfd8c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexis=20M=C3=A9taireau?= Date: Sun, 14 Jan 2018 16:52:52 +0100 Subject: Use Jinja2 strict rendering. For this I had to create an Jinja2 explicit environment, so I put a function in `ihatemoney.utils.create_jinja2_env(strict_rendering=False)`. When using this environment and if `strict_rendering` is activated, templates using undefined variables will now error out rather than failing silently. --- ihatemoney/conf-templates/apache-vhost.conf.j2 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'ihatemoney/conf-templates/apache-vhost.conf.j2') diff --git a/ihatemoney/conf-templates/apache-vhost.conf.j2 b/ihatemoney/conf-templates/apache-vhost.conf.j2 index 3246d27..0527d31 100644 --- a/ihatemoney/conf-templates/apache-vhost.conf.j2 +++ b/ihatemoney/conf-templates/apache-vhost.conf.j2 @@ -1,8 +1,7 @@ ServerAdmin admin@example.com # CUSTOMIZE ServerName ihatemoney.example.com # CUSTOMIZE - - WSGIDaemonProcess ihatemoney user=www-data group=www-data threads=5 python-path={{ pkg_path }} {% if venv_path %}python-home={{ venv_path }}{% endif %} + WSGIDaemonProcess ihatemoney user=www-data group=www-data threads=5 python-path={{ pkg_path }} {% if bin_path %}python-home={{ bin_path }}{% endif %} WSGIScriptAlias / {{ pkg_path }}/wsgi.py WSGIPassAuthorization On -- cgit v1.1 From c3f8ddd274a40b164b5fceeab44c1c26cf053b04 Mon Sep 17 00:00:00 2001 From: JocelynDelalande Date: Mon, 16 Jul 2018 22:55:54 +0200 Subject: Fix Apache conf template, without relying on environment var (#359) `python-home` is prefered over `python-path`. It will work with or without a virtualenv. See http://modwsgi.readthedocs.io/en/develop/configuration-directives/WSGIDaemonProcess.html --- ihatemoney/conf-templates/apache-vhost.conf.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ihatemoney/conf-templates/apache-vhost.conf.j2') diff --git a/ihatemoney/conf-templates/apache-vhost.conf.j2 b/ihatemoney/conf-templates/apache-vhost.conf.j2 index 0527d31..e169589 100644 --- a/ihatemoney/conf-templates/apache-vhost.conf.j2 +++ b/ihatemoney/conf-templates/apache-vhost.conf.j2 @@ -1,7 +1,7 @@ ServerAdmin admin@example.com # CUSTOMIZE ServerName ihatemoney.example.com # CUSTOMIZE - WSGIDaemonProcess ihatemoney user=www-data group=www-data threads=5 python-path={{ pkg_path }} {% if bin_path %}python-home={{ bin_path }}{% endif %} + WSGIDaemonProcess ihatemoney user=www-data group=www-data threads=5 python-home={{ sys_prefix }} WSGIScriptAlias / {{ pkg_path }}/wsgi.py WSGIPassAuthorization On -- cgit v1.1