ignore custom httpd template for specific user

wtptrs

Verified User
Joined
Jul 13, 2015
Messages
74
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?
 

zEitEr

Super Moderator
Joined
Apr 11, 2005
Messages
14,255
Location
GMT +7.00
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|
 
Top