{"id":3153,"date":"2020-05-21T18:24:52","date_gmt":"2020-05-21T12:54:52","guid":{"rendered":"https:\/\/www.24x7serversupport.com\/blog\/?p=3153"},"modified":"2023-01-28T11:44:40","modified_gmt":"2023-01-28T06:14:40","slug":"how-to-customize-apache-config-and-not-have-custombuild-revert-it-in-directadmin","status":"publish","type":"post","link":"https:\/\/www.24x7serversupport.com\/blog\/how-to-customize-apache-config-and-not-have-custombuild-revert-it-in-directadmin\/","title":{"rendered":"How to customize apache config and not have custombuild revert it in DirectAdmin"},"content":{"rendered":"\n<p>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.<\/p>\n\n\n\n<p>There are 3 ways of making your customizations stick:<\/p>\n\n\n\n<p><strong>1)<\/strong> the &#8220;official&#8221; way would be to use the custombuild custom directory method:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">cd \/usr\/local\/directadmin\/custombuild\nmkdir -p custom\/ap2\ncp -Rp configure\/ap2\/conf custom\/ap2<\/pre>\n\n\n\n<p>and then edit your configs in:<br>custom\/ap2\/conf<br><br>as needed. &nbsp;The custom path overrides the default, and won&#8217;t be overwritten. &nbsp;Your customized files will be used for the overwrite, so you just need to remember to make your changes in the custom path.<br><br>If you make changes to the custom files, you can test what result you&#8217;ll get by typing:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">.\/build rewrite_confs<\/pre>\n\n\n\n<p>from the custombuild directory.<\/p>\n\n\n\n<p><strong>2)<\/strong> If you only need to add extra Apache config code to the system, but don&#8217;t need to remove any existing code, the best way is to add your changes to:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/etc\/httpd\/conf\/extra\/httpd-includes.conf<\/pre>\n\n\n\n<p>as this file will not be touched by CustomBuild or DirectAdmin. &nbsp;If it doesn&#8217;t exist, DA will &#8216;touch&#8217; it so that it exists, but any changes you add there will be safe from any external changes.<\/p>\n\n\n\n<p><strong>3)<\/strong> The easiest way would be to run:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">chattr +i \/etc\/httpd\/conf\/httpd.conf<\/pre>\n\n\n\n<p>Then custombuild won&#8217;t touch it. &nbsp;You can repeat this command on any other files you need, eg \/etc\/httpd\/conf\/extra\/httpd-alias.conf, etc..<br><br>You&#8217;d then use:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">chattr -i \/etc\/httpd\/conf\/httpd.conf <\/pre>\n\n\n\n<p>to allow changes again when needed. &nbsp;Don&#8217;t forget to lock it again after you&#8217;re done.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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. There are 3 ways of making your customizations stick: 1) the &#8220;official&#8221; way would be to use the custombuild custom directory method: cd \/usr\/local\/directadmin\/custombuild mkdir -p custom\/ap2 cp -Rp [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3581,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[1],"tags":[],"class_list":["post-3153","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"jetpack_publicize_connections":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to customize apache config and not have custombuild revert it in DirectAdmin | 24x7serversupport Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.24x7serversupport.com\/blog\/how-to-customize-apache-config-and-not-have-custombuild-revert-it-in-directadmin\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to customize apache config and not have custombuild revert it in DirectAdmin | 24x7serversupport Blog\" \/>\n<meta property=\"og:description\" content=\"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. There are 3 ways of making your customizations stick: 1) the &#8220;official&#8221; way would be to use the custombuild custom directory method: cd \/usr\/local\/directadmin\/custombuild mkdir -p custom\/ap2 cp -Rp [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.24x7serversupport.com\/blog\/how-to-customize-apache-config-and-not-have-custombuild-revert-it-in-directadmin\/\" \/>\n<meta property=\"og:site_name\" content=\"24x7serversupport Blog\" \/>\n<meta property=\"article:published_time\" content=\"2020-05-21T12:54:52+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-01-28T06:14:40+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.24x7serversupport.com\/blog\/wp-content\/uploads\/2020\/05\/customize-apache-config.png\" \/>\n\t<meta property=\"og:image:width\" content=\"620\" \/>\n\t<meta property=\"og:image:height\" content=\"501\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"24x7support\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@24x7serversuppo\" \/>\n<meta name=\"twitter:site\" content=\"@24x7serversuppo\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"24x7support\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/how-to-customize-apache-config-and-not-have-custombuild-revert-it-in-directadmin\/\",\"url\":\"https:\/\/www.24x7serversupport.com\/blog\/how-to-customize-apache-config-and-not-have-custombuild-revert-it-in-directadmin\/\",\"name\":\"How to customize apache config and not have custombuild revert it in DirectAdmin | 24x7serversupport Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/how-to-customize-apache-config-and-not-have-custombuild-revert-it-in-directadmin\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/how-to-customize-apache-config-and-not-have-custombuild-revert-it-in-directadmin\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/www.24x7serversupport.com\/blog\/wp-content\/uploads\/2020\/05\/customize-apache-config.png?fit=620%2C501&ssl=1\",\"datePublished\":\"2020-05-21T12:54:52+00:00\",\"dateModified\":\"2023-01-28T06:14:40+00:00\",\"author\":{\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/#\/schema\/person\/decfb5fad6bde6ac6822d4e965c6d401\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/how-to-customize-apache-config-and-not-have-custombuild-revert-it-in-directadmin\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.24x7serversupport.com\/blog\/how-to-customize-apache-config-and-not-have-custombuild-revert-it-in-directadmin\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/how-to-customize-apache-config-and-not-have-custombuild-revert-it-in-directadmin\/#primaryimage\",\"url\":\"https:\/\/i0.wp.com\/www.24x7serversupport.com\/blog\/wp-content\/uploads\/2020\/05\/customize-apache-config.png?fit=620%2C501&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/www.24x7serversupport.com\/blog\/wp-content\/uploads\/2020\/05\/customize-apache-config.png?fit=620%2C501&ssl=1\",\"width\":620,\"height\":501,\"caption\":\"customize apache config\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/how-to-customize-apache-config-and-not-have-custombuild-revert-it-in-directadmin\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.24x7serversupport.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to customize apache config and not have custombuild revert it in DirectAdmin\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/#website\",\"url\":\"https:\/\/www.24x7serversupport.com\/blog\/\",\"name\":\"24x7serversupport Blog\",\"description\":\"Linux | CPanel | WHM | webhosting| Plesk | DirectAdmin | CentOs | Debian | Ubuntu Blog\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.24x7serversupport.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/#\/schema\/person\/decfb5fad6bde6ac6822d4e965c6d401\",\"name\":\"24x7support\",\"url\":\"https:\/\/www.24x7serversupport.com\/blog\/author\/24x7support\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to customize apache config and not have custombuild revert it in DirectAdmin | 24x7serversupport Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.24x7serversupport.com\/blog\/how-to-customize-apache-config-and-not-have-custombuild-revert-it-in-directadmin\/","og_locale":"en_US","og_type":"article","og_title":"How to customize apache config and not have custombuild revert it in DirectAdmin | 24x7serversupport Blog","og_description":"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. There are 3 ways of making your customizations stick: 1) the &#8220;official&#8221; way would be to use the custombuild custom directory method: cd \/usr\/local\/directadmin\/custombuild mkdir -p custom\/ap2 cp -Rp [&hellip;]","og_url":"https:\/\/www.24x7serversupport.com\/blog\/how-to-customize-apache-config-and-not-have-custombuild-revert-it-in-directadmin\/","og_site_name":"24x7serversupport Blog","article_published_time":"2020-05-21T12:54:52+00:00","article_modified_time":"2023-01-28T06:14:40+00:00","og_image":[{"width":620,"height":501,"url":"https:\/\/www.24x7serversupport.com\/blog\/wp-content\/uploads\/2020\/05\/customize-apache-config.png","type":"image\/png"}],"author":"24x7support","twitter_card":"summary_large_image","twitter_creator":"@24x7serversuppo","twitter_site":"@24x7serversuppo","twitter_misc":{"Written by":"24x7support","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.24x7serversupport.com\/blog\/how-to-customize-apache-config-and-not-have-custombuild-revert-it-in-directadmin\/","url":"https:\/\/www.24x7serversupport.com\/blog\/how-to-customize-apache-config-and-not-have-custombuild-revert-it-in-directadmin\/","name":"How to customize apache config and not have custombuild revert it in DirectAdmin | 24x7serversupport Blog","isPartOf":{"@id":"https:\/\/www.24x7serversupport.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.24x7serversupport.com\/blog\/how-to-customize-apache-config-and-not-have-custombuild-revert-it-in-directadmin\/#primaryimage"},"image":{"@id":"https:\/\/www.24x7serversupport.com\/blog\/how-to-customize-apache-config-and-not-have-custombuild-revert-it-in-directadmin\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/www.24x7serversupport.com\/blog\/wp-content\/uploads\/2020\/05\/customize-apache-config.png?fit=620%2C501&ssl=1","datePublished":"2020-05-21T12:54:52+00:00","dateModified":"2023-01-28T06:14:40+00:00","author":{"@id":"https:\/\/www.24x7serversupport.com\/blog\/#\/schema\/person\/decfb5fad6bde6ac6822d4e965c6d401"},"breadcrumb":{"@id":"https:\/\/www.24x7serversupport.com\/blog\/how-to-customize-apache-config-and-not-have-custombuild-revert-it-in-directadmin\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.24x7serversupport.com\/blog\/how-to-customize-apache-config-and-not-have-custombuild-revert-it-in-directadmin\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.24x7serversupport.com\/blog\/how-to-customize-apache-config-and-not-have-custombuild-revert-it-in-directadmin\/#primaryimage","url":"https:\/\/i0.wp.com\/www.24x7serversupport.com\/blog\/wp-content\/uploads\/2020\/05\/customize-apache-config.png?fit=620%2C501&ssl=1","contentUrl":"https:\/\/i0.wp.com\/www.24x7serversupport.com\/blog\/wp-content\/uploads\/2020\/05\/customize-apache-config.png?fit=620%2C501&ssl=1","width":620,"height":501,"caption":"customize apache config"},{"@type":"BreadcrumbList","@id":"https:\/\/www.24x7serversupport.com\/blog\/how-to-customize-apache-config-and-not-have-custombuild-revert-it-in-directadmin\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.24x7serversupport.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to customize apache config and not have custombuild revert it in DirectAdmin"}]},{"@type":"WebSite","@id":"https:\/\/www.24x7serversupport.com\/blog\/#website","url":"https:\/\/www.24x7serversupport.com\/blog\/","name":"24x7serversupport Blog","description":"Linux | CPanel | WHM | webhosting| Plesk | DirectAdmin | CentOs | Debian | Ubuntu Blog","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.24x7serversupport.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.24x7serversupport.com\/blog\/#\/schema\/person\/decfb5fad6bde6ac6822d4e965c6d401","name":"24x7support","url":"https:\/\/www.24x7serversupport.com\/blog\/author\/24x7support\/"}]}},"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.24x7serversupport.com\/blog\/wp-content\/uploads\/2020\/05\/customize-apache-config.png?fit=620%2C501&ssl=1","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/posts\/3153","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/comments?post=3153"}],"version-history":[{"count":2,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/posts\/3153\/revisions"}],"predecessor-version":[{"id":3582,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/posts\/3153\/revisions\/3582"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/media\/3581"}],"wp:attachment":[{"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/media?parent=3153"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/categories?post=3153"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/tags?post=3153"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}