How to setup custom settings httpd

fpieters

Verified User
Joined
Aug 13, 2013
Messages
6
Hi There,

We have a redmine installation on a subdomein. For this installation we have some special settings made in the httpd file directly. But when I add another subdomain these settings are overwritten. I now know that it is possible to set custom settings in the administrator site of directadmin.

But I think the documentation is not very clear how to do this.

This is the httpd part which needs some custome settings. I Marked the non default lines with an asterisk (*):

Code:
<VirtualHost 123.123.123.123:80>
    ServerName [url]www.redmine.domain.nl[/url]
    ServerAlias [url]www.redmine.domain.nl[/url] redmine.domain.nl
    ServerAdmin [email][email protected][/email]
*    DocumentRoot /home/USERNAME/domains/domain.nl/public_html/redmine/public
   
*   RailsEnv production   
*    UseCanonicalName OFF

    SuexecUserGroup USERNAME USERNAME
    CustomLog /var/log/httpd/domains/domain.nl.redmine.bytes bytes
    CustomLog /var/log/httpd/domains/domain.nl.redmine.log combined
    ErrorLog /var/log/httpd/domains/domain.nl.redmine.error.log
 *   <Directory /home/USERNAME/domains/domain.nl/public_html/redmine/public>
 *       Options +Includes +ExecCGI +FollowSymLinks -Indexes
 *       Order allow,deny
 *       Allow from all
 *       AllowOverride all

        php_admin_flag engine ON
        <IfModule !mod_php6.c>
            php_admin_flag safe_mode OFF
        </IfModule>
        php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f [email][email protected][/email]'

    </Directory>
  
</VirtualHost>
<VirtualHost 123.123.123.123:80>



I think I have to create something like this but I dont know where to put the settings like "Options +Includes +ExecCGI +FollowSymLinks -Indexes",

|*if SUB="redmine"|
#custom item for just this domain
|?DOCROOT=/home/USERNAME/domains/domain.nl/public_html/redmine/public|

|*endif|


Hope someone with more experience on this can help me.

Thanks,

Frank
 
The DirectAdmin facility for customizing your httpd.conf settings are probably not going to work out well for you; they may not give you all the customization you need.

I'd recommend that you create the subdomain as if it were a single domain. Then you may be able to use the admin level changes. If theywon't work because they don't put the changes in the right location, or don't allow all the changes you need, you can edit the file manually, and then chattr it immutable so DirectAdmin can't overwrite it.

Jeff
 
Thanks

Hi Jeff,

Thank you for your answer. I decided to add the subdomain and manually edit the httpd file to get the special settings back.

It is some more work when adding a subdomain but luckely this isn't done every day..

Gr,
Frank
 
Back
Top