Fix Apache conf template, without relying on environment var

`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
This commit is contained in:
Jocelyn Delalande 2018-07-16 22:23:56 +02:00
parent 230eafdf58
commit d86ea85cea
2 changed files with 2 additions and 1 deletions

View file

@ -1,7 +1,7 @@
<VirtualHost *:80> <VirtualHost *:80>
ServerAdmin admin@example.com # CUSTOMIZE ServerAdmin admin@example.com # CUSTOMIZE
ServerName ihatemoney.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 WSGIScriptAlias / {{ pkg_path }}/wsgi.py
WSGIPassAuthorization On WSGIPassAuthorization On

View file

@ -52,6 +52,7 @@ class GenerateConfig(Command):
print(template.render( print(template.render(
pkg_path=pkg_path, pkg_path=pkg_path,
bin_path=bin_path, bin_path=bin_path,
sys_prefix=sys.prefix,
secret_key=self.gen_secret_key(), secret_key=self.gen_secret_key(),
)) ))