I wish to customize /etc/httpd/conf/httpd.conf and not have custombuild revert it


Enter Your Query:
Use '%' for wildcards and quotes for "exact phrases"


Top Level » Apache Related Information
Top Level » The CustomBuild scripts

I wish to customize /etc/httpd/conf/httpd.conf and not have custombuild revert itLast Modified: May 22, 2012, 12:25 pm
If you need to make customized changes to your /etc/httpd/conf/httpd.conf, when custombuild updates apache, your configs will be changed to the new versions of the configs.

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


1) The easiest way would be to run:

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

Then custombuild won't touch it.  You can repeat this command on any other files you need, eg /etc/httpd/conf/extra/httpd-alias.conf, etc..

You'd then use:

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

to allow changes again when needed.  Don't forget to lock it again after you're done.


2) 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:
custom/ap2/conf

as needed.  The custom path overrides the default, and won't be overritten.  Your customized files will be used for the overwrite, so you just need to remember to make your changes in the custom path, as well as the main httpd.conf.

If you make changes to the custom files, you can test what result you'll get by typing:

./build rewrite_confs

from the custombuild directory.


3) If you only need to add extra Apache config code to the system, but don't need to remove any existing code, the best way is to add your changes to:

/etc/httpd/conf/extra/httpd-includes.conf

as this file will not be touched by CustomBuild or DirectAdmin.  If it doesn't exist, DA will 'touch' it so that it exists, but any changes you add there will be safe from any external changes.
 
Related Helpfiles
Using a custom VirtualHost template
Adding custom httpd.conf code to the VirtualHosts of a domain

2003 JBMC Software, Suite 173  3-11 Bellerose Drive, St Albert, AB  T8N 1P7  Canada.  Mon-Fri 9AM-5PM MST