Change template for apache vhosts

Locked
rnssystems
Posts: 8
Joined: Thu 17. Nov 2016, 18:19

Change template for apache vhosts

Post 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
User avatar
Alexander
Keyweb AG
Posts: 3810
Joined: Wed 20. Jan 2016, 02:23

Re: Change template for apache vhosts

Post 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
Mit freundlichen Grüßen / Best regards
Alexander Mahr

**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
User avatar
Tobi
Community Moderator
Posts: 2812
Joined: Thu 5. Jan 2017, 13:24

Re: Change template for apache vhosts

Post 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.
Gruß,
Tobi


-----------------------------
wewoco.de
Das Forum für Reseller, Digital-Agenturen, Bildschirmarbeiter und Mäuseschubser
Locked