DirectAdmin Allows Admin to insert extra httpd.conf code that a User may require. Â To access the control page for this functionality, go to Admin Panel -> Admin Settings -> Customize Httpd Configurations.
Once you see the list of domain, click the domain you wish to insert the extra httpd.conf code to.
At the bottom of the page, you'll see the current httpd.conf for that User. Â It will contain all VirtualHosts for all domain, subdomains and redirects. Â Any changes made by this page will only affect the VirtualHosts for the domain in question, not the other domains owned by that user. Â If all domains need the changes, then you would repeat this process for each domain.
The top textarea is where you will paste the custom httpd.conf code you wish to insert. Â The code you write will be inserted into the |CUSTOM| token for all VirtualHosts for this domain. Â You can edit the templates as needed if you require to move the |CUSTOM| token to a different position in the VirtualHost.
All tokens that are available for the VirtualHost will be available with this feature. Â You can also set any token you wish. Â For example, if you with to change the DocumentRoot for a domain, you can paste:
|?DOCROOT=/new/path/you/want|
Note that this new DocumentRoot will be used for all DocumentRoots for this domain, including https connections and subdomains, so it may not be a desired effect.Another common use is to add another ServerAlias. Â This allows another domain to be used to access the exact same content. Â To accomplish this, you would write
ServerAlias newdomain.com www.newdomain.com
To get newdomain.com and www.newdomain.com to point to the original domain for the VirtualHost. Â You will also have to make sure that newdomain.com and www.newdomain.com both resolve to the same IP as stored in |IP|.