Page 1 of 1

Change template for apache vhosts

Posted: Mon 21. Nov 2016, 14:13
by rnssystems
Hi,
I would like to change the template for new apache vhosts created by keyhelp.
I would like to add an additional include to have the possibility to set some aliases which persists also when keyhelp regenerates the vhost config.

Regards
Julian

Re: Change template for apache vhosts

Posted: Mon 21. Nov 2016, 15:13
by Alexander
Hi Julian,

currently, it is not possible to change the template KeyHelp uses for creating config files. There is only one workaround you can use, but this prevents KeyHelp from regenerating the files: make files immutable with chattr +i.

In the near future (in this forum, i have said december, but as it looks right now, january 2017 will be more likely) i will add a new feature which let you change the configuration template via TWIG Template Engine Syntax and inside of the KeyHelp panel.

Kind regards,
Alex

Re: Change template for apache vhosts

Posted: Mon 23. Jan 2017, 08:22
by Tobi
I wrote a litte PHP Script which runs hourly as a root-cron.

The script compares the actual vhost-file. If changes a found (e.g. vhost file is newer than the last script run) the PHP script modifies the vhost file and replaces the original file.
In my case the script modifies the logfile name for the different domains.
It works like charm ;)
No need to chattr +i.