Ability to set global/user/domain/subdomain custom Apache/Nginx tokens

Version 1.49


The existing virtual_host2*.conf templates allow you to do pretty much anything you need, but there are cases where you might only want to add or change one small variable without creating an entire new set of templates. This feature allows you to insert your own global tokens into a config file: /usr/local/directadmin/data/admin/global_httpd_tokens.conf set with the internal directadmin.conf default: global_httpd_tokens=/usr/local/directadmin/data/admin/global_httpd_tokens.conf one token per line, with a = character, followed by the value you want to set. There will also be similar files for users, domains and subdomains, if you create them: /usr/local/directadmin/data/users/username/user.httpd_tokens /usr/local/directadmin/data/users/username/domains/domain.com.httpd_tokens /usr/local/directadmin/data/users/username/domains/domain.com.subdomain.httpd_tokens load in that order. They will be loaded after the DA based tokens are set, but *before* the CUSTOM tokens, so that they're available in the domain.com.cust_httpd files. If you want to set a CUSTOM token, do that in the domain.com.cust_httpd. This type of setup can be handy in the event that you may include a set of templates for many servers, and need to update those templates from time to time, but you might want to have a different tokens in each server, used by those templates (or per-domain customization)

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