{"id":857,"date":"2021-12-17T20:51:32","date_gmt":"2021-12-17T14:51:32","guid":{"rendered":"https:\/\/mellowhost.com\/blog\/?p=857"},"modified":"2021-12-18T00:04:03","modified_gmt":"2021-12-17T18:04:03","slug":"apache-detected-an-error-in-the-rewrite-config-httpd_ls_bak-syntax-error-in-c-c-directive-include-includeoptional-could-not-open-directory-usr-local-apache-conf-modules-d-no-such-file-or-direc","status":"publish","type":"post","link":"https:\/\/mellowhost.com\/blog\/apache-detected-an-error-in-the-rewrite-config-httpd_ls_bak-syntax-error-in-c-c-directive-include-includeoptional-could-not-open-directory-usr-local-apache-conf-modules-d-no-such-file-or-direc.html","title":{"rendered":"Apache detected an error in the Rewrite config. httpd_ls_bak: Syntax error in -C\/-c directive: Include\/IncludeOptional: Could not open directory \/usr\/local\/apache\/conf.modules.d: No such file or directory Please try again. &#8211; Cpanel Error"},"content":{"rendered":"\n<p>You might see the following set of errors with Cpanel<\/p>\n\n\n\n<p>When trying to remove the redirect from Cpanel<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">Apache detected an error in the Rewrite config. &lt;pre>httpd_ls_bak: Syntax error in -C\/-c directive: Include\/IncludeOptional: Could not open directory \/usr\/local\/apache\/conf.modules.d: No such file or directory &lt;\/pre> Please try again.<\/pre>\n\n\n\n<p>\/scripts\/rebuildhttpdconf generates an error like the following:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">httpd: Syntax error in -C\/-c directive: Include\/IncludeOptional: Could not open directory \/usr\/local\/apache\/conf.modules.d: No such file or directory<\/pre>\n\n\n\n<p><strong>Resolution<\/strong><\/p>\n\n\n\n<p>Previously, we reinstalled apache24 to solve the issue like the following:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">yum reinstall ea-apache24<\/pre>\n\n\n\n<p>Although you may also reinstall the apache config runtime extension, that shall fix the issue as well. <\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">rpm -e --nodeps --justdb ea-apache24-config-runtime.noarch\nyum install ea-apache24-config-runtime.noarch<\/pre>\n\n\n\n<p>Now you may rebuild the httpd conf or remove the redirect from cpanel without any problem.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You might see the following set of errors with Cpanel When trying to remove the redirect from Cpanel \/scripts\/rebuildhttpdconf generates an error like the following: Resolution Previously, we reinstalled apache24 to solve the issue like the following: Although you may also reinstall the apache config runtime extension, that shall fix the issue as well. Now &hellip; <a href=\"https:\/\/mellowhost.com\/blog\/apache-detected-an-error-in-the-rewrite-config-httpd_ls_bak-syntax-error-in-c-c-directive-include-includeoptional-could-not-open-directory-usr-local-apache-conf-modules-d-no-such-file-or-direc.html\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Apache detected an error in the Rewrite config. httpd_ls_bak: Syntax error in -C\/-c directive: Include\/IncludeOptional: Could not open directory \/usr\/local\/apache\/conf.modules.d: No such file or directory Please try again. &#8211; Cpanel Error&#8221;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[6,12],"tags":[46,650,649,648],"_links":{"self":[{"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/posts\/857"}],"collection":[{"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/comments?post=857"}],"version-history":[{"count":2,"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/posts\/857\/revisions"}],"predecessor-version":[{"id":860,"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/posts\/857\/revisions\/860"}],"wp:attachment":[{"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/media?parent=857"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/categories?post=857"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/tags?post=857"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}