How i can save current httpd.conf after ./build ?

WebArts

Verified User
Joined
Jul 14, 2010
Messages
108
Hi.
I had edited and had customized httpd.conf but after i did custombuild ./build apache; my httpd.conf was changed and my command remove from http.conf and i edited it again.

1) how i can do ./build with the condition that my customized text in httpd.conf would be stable after ./build apache.

2) Does need apache to ./build after each editing httpd.conf?
 
Answers to the 1st question:
1. "./build apache" shouldn't affect httpd.conf, unless you run CB for the first time.
2. You can add your "customized text" to /etc/httpd/conf/extra/httpd-includes.conf, then it will remain there even after "./build rewrite_confs".
3. The other solution is to copy your current httpd.conf file to /usr/local/directadmin/custombuild/custom/ap2/conf. "./build rewrite_confs" would use the httpd.conf file from here instead of its default one then.

Answer to the 2nd question: no, it does not.
 
Note, it might be useful to use /etc/httpd/conf/extra/httpd-includes.conf to include your custom configs. For example in /etc/httpd/conf/extra/httpd-includes.conf I've got:

Code:
Include /etc/httpd/conf/extra/httpd-custom-alias.conf
Include /etc/httpd/conf/extra/httpd-custom-caching.conf
Include /etc/httpd/conf/extra/httpd-custom-phpmyadmin.conf
Include /etc/httpd/conf/extra/httpd-custom-realip.conf
Include /etc/httpd/conf/extra/httpd-custom-secure.conf
Include /etc/httpd/conf/extra/httpd-custom-webmail.conf

and use
Code:
chattr -i
to protect files against been overwritten:

Code:
[root@vps1 extra]# lsattr | grep php
----i-------- ./httpd-custom-phpmyadmin.conf
----i-------- ./httpd-php-handlers.conf
----i-------- ./httpd-phpaddmodules.conf
----i-------- ./httpd-phpmodules.conf
----i-------- ./httpd-suphp.conf
 
Back
Top