
| ||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||
| If you wish to change the setup of the VirtualHosts for all domains, you can do so by creating your own custom templates. cd /usr/local/directadmin/data/templates Inside the virtual_host*.conf files, you'll find code that is similar to httpd.conf code, but contains what are known as tokens. These tokens are what will be replaces with specific user data for each domain created.
The top of the templates should contain |?CGI=...| and |?DOCROOT=...|. These lines are where the data for the CGI and DOCROOT tokens are set. If cgi is not enabled, this line wil be ignored and the CGI token will be empty. If the domain is suspended, the DOCROOT will be filled the the path of the suspend page. The CAROOT token will be empty unless the User has added a valid CARootCertificate through DA. You can use tokens when assigning a value to CGI or DOCROOT, just use `TOKEN` instead of |TOKEN|. Once you are happy with your new virtual_host*.conf files they'll need to be used in the real httpd.conf files. You can trigger DirectAdmin to rewrite all User httpd.conf files by running: echo "action=rewrite&value=httpd" >> /usr/local/directadmin/data/task.queue The command will be added the the task queue which is checked once per minute, so it may be a few minutes before all httpd.conf files have been rewritten. *Note: the main /etc/httpd/conf/httpd.conf is never overwritten (unless DirectAdmin is reinstalled) so any changes you make will be safe.Note, that you can also use if-then-else statements if you don't want all settings to be global. Example, say you want a custom item added, only for 1 domain: |*if DOMAIN="domain.com"| You can also run actual scripts with database queries, etc... if you wanted using the script portion of the templates. More info on that here: http://www.directadmin.com/features.php?id=756 | ||||||||||||||||||||||||||||||||||||||||
| Related Helpfiles | ||||||||||||||||||||||||||||||||||||||||
| Adding custom httpd.conf code to the VirtualHosts of a domain | ||||||||||||||||||||||||||||||||||||||||
| Setting up webmail.domain.com as default for new domains. | ||||||||||||||||||||||||||||||||||||||||
| How can I edit all of the templates, messages, and default index.html pages? | ||||||||||||||||||||||||||||||||||||||||
![]()
© 2003 JBMC Software, Suite 173 3-11 Bellerose Drive, St Albert, AB T8N 1P7 Canada. Mon-Fri 9AM-5PM MST