Issues related to compiling apache, php etc.. I wish to customize /etc/httpd/conf/httpd.conf and not have custombuild revert it

Issues related to compiling apache, php etc.. I wish to customize /etc/httpd/conf/httpd.conf and not have custombuild revert it

If there you need to make customized changes to your /etc/httpd/conf/httpd.conf, when custombuild updates apache, your configurations will be change to the new versions of the configs.

Since you are re looking for customized versions, you don’t want your changes to be lost.
There are 3 ways of making your customization stick:

1) the “official” way would be to use the custombuild custom directory method:

cd /usr/local/directadmin/custombuild
mkdir -p custom/ap2
cp -Rp configure/ap2/conf custom/ap2

and then edit your configs in:

as needed.  The custom path overrides the default, and will not be overwritten.  Your customized files will be using for the overwrite, so you just need to remember to make your changes in the custom path.

If you make changes to the custom files, you can test what results you will get by typing:

./build rewrite_confs

from the custombuild directory.

2) If there you only need to add extra Apache config code to the system, but do not need to remove any existing code, the best way is to add your changes to:


as this file will not be touched by CustomBuild or DirectAdmin.

If it does not exist, DA will ‘touch’ it so that it exists, but any changes you add there will be safe from any external changes.

3) The easiest way would be to run:

chattr +i /etc/httpd/conf/httpd.conf

Then custombuild will not touch it.

You can repeat this command on any other files you need, eg /etc/httpd/conf/extra/httpd-alias.conf, etc..

You would then use:

chattr -i /etc/httpd/conf/httpd.conf

to allow changes again when you needed.  Do not forget to lock it again after you are done.

Using custom configs for PhpMyAdmin, SquirrelMail and Roundcube

If you have got custom options enabled for any of PhpMyAdmin, SquirrelMail or Roundcube, then you will need a way to maintain those customizations between updates by custombuild.

For doing that, you would simply copy your custom config to the relevant path.
The 3 paths are as follows:



#Roundcube >= 1.0.0
#Roundcube <= 0.9.5
#RoundCube && CustomBuild 2.0

If the relevant config exists, then the custombuild script will copy it to the relevant path of the newly installed script, somewhere in /var/www/html/*.

Also, the following directory:


if there it exists, will have it is contents copied into:


overwriting any duplicates.  This can be used to copy specific files/configs/directories for customized plugins over to the new version.

Similarly, if this exists:


it contents will be copied into:


overwriting any duplicates.


Leave a Reply

Your email address will not be published. Required fields are marked *