Subdomain DocumentRoot override file (TEMPLATES)

Version 1.59.5


New optional file, GUI to be implemented in the future: /usr/local/directadmin/data/users/USERNAME/domains/DOMAIN.COM.subdomains.docroot.override where the file might show this for sub.DOMAIN.COM: sub=public_html=/domains/DOMAIN.COM/public_html&private_html=/domains/DOMAIN.COM/private_html where "sub" is the index on the left, matching up with the subdomain in question. While writing the VirtualHost for a subdomain, if the file exist, "sub" exist, and the given public_html or private_html variable exist for that VH, DA will use the listed path as an override, relative to the User's home directory. In the above example, the DocumentRoot would end up being: ServerName www.sub.DOMAIN.COM ... DocumentRoot /home/USERNAME/domains/DOMAIN.COM/public_html The one of the public_html and private_html values are optional, in case you wanted to override one part, but not the other. ================== TEMPLATES openlitespeed_vhost.conf Because the OLS template is a single file for domains, subdomains, and http/https, minor changes were needed to allow the SDOCROOT to be set globally, to override the DOCROOT token in the template: Set AFTER the CUSTOM token: |?SDOCROOT=`DOCROOT`/`SUB`| |*if SUB| |?DOCROOT=`SDOCROOT`| |*endif| where SDOCROOT is not set if it was already loaded globally (which is what the override file does) ---- T21547

Try DirectAdmin with a 30-day money back guarantee!