Custom Domain Items values available in virtual_host2.conf templates

Version 1.514


The custom_domain_items feature lets you set custom per-domain variables. This change allow those variables which are set in the domain's config file: /usr/local/directadmin/data/users/username/domains/ to be available as a token in the User's httpd.conf templates with the token syntax: |CUSTOM_DOMAIN_ITEM_%s| where %s is swapped with the custom item name, and that whole token, when used in the tempaltes, will be swapped with the value from the For example, if you have this file: /usr/local/directadmin/data/admin/custom_domain_items.conf loaded with: banana=type=checkbox&string=Custom 1&desc=Yellow&checked1=yes Then you can use the token: |CUSTOM_DOMAIN_ITEM_banana| in the virtual_host2.conf templates (and subdomains, and pointers). Note that this token will only be available if: banana=anything is actually set in the file. If it's unset (name does not exist), then the token will not be set. An example usage of the token might be: |*if CUSTOM_DOMAIN_ITEM_banana="ON"| Options +banana |*endif| and a sample, (and invalid) example.

Interested to try DirectAdmin? Get a 30-day Free Trial!