ignore custom httpd template for specific user

wtptrs

Verified User
Joined
Jul 13, 2015
Messages
329
We've added some custom templates for our users, in order to configure some extra server aliases when these users are created, i.e. in /usr/local/directadmin/data/templates/custom/virtual_host2.conf:

Code:
ServerAlias www.|DOMAIN| |DOMAIN| |SERVER_ALIASES| [B]|DOMAIN|.|HOSTNAME| www.|DOMAIN|.|HOSTNAME|[/B]

These templates are being written also when updating Directadmin, running ./build rewrite_confs etc. Is there a way of disabling these custom templates for one specific user?

Would chattr +i /usr/local/directadmin/data/users/$USERTOIGNORE/httpd.conf work or will this have an impact on other things as well?
 
Hello,

If it's only one user to exclude, then try this:

Code:
|*if USER="[B][COLOR=#333333]usertoignore[/COLOR][/B]"|
           ServerAlias www.|DOMAIN| |DOMAIN| |SERVER_ALIASES|

|*else|
           ServerAlias www.|DOMAIN| |DOMAIN| |SERVER_ALIASES| |DOMAIN|.|HOSTNAME| www.|DOMAIN|.|HOSTNAME|
|*endif|
 
Back
Top