rebuild httpdconf problem
I had a problem
When I enter "/scripts/rebuildhttpdconf" I get an Error.
[QUOTE]
Initial configuration generation failed with the following message:
The "/usr/local/apache/bin/httpd -DSSL -t -f /usr/local/apache/conf/httpd.conf.work.7f3ce1df.cfgcheck -C Include "/usr/local/apache/conf.modules.d/*.conf"" command (process 18108) reported error number 1 when it ended.
httpd: Syntax error in -C/-c directive: Include/IncludeOptional: Could not open directory /usr/local/apache/conf.modules.d: No such file or directory
Rebuilding configuration without any local modifications.
Failed to generate a syntactically correct Apache configuration.
Bad configuration file located at /usr/local/apache/conf/httpd.conf.work.7f3ce1df
Error:
The "/usr/local/apache/bin/httpd -DSSL -t -f /usr/local/apache/conf/httpd.conf.work.7f3ce1df.cfgcheck -C Include "/usr/local/apache/conf.modules.d/*.conf"" command (process 18151) reported error number 1 when it ended.
httpd: Syntax error in -C/-c directive: Include/IncludeOptional: Could not open directory /usr/local/apache/conf.modules.d: No such file or directory
Server is run with litespeed and cloudlinux 7.7 No changes can be made to Apache Configuration. I cannot switch from Lightspeed to Apache. Cannot Create Subdomain or any changes to httpd.conf any idea?
Server is run with litespeed and cloudlinux 7.7 No changes can be made to Apache Configuration. I cannot switch from Lightspeed to Apache. Cannot Create Subdomain or any changes to httpd.conf any idea?
-
httpd: Syntax error in -C/-c directive: Include/IncludeOptional: Could not open directory /usr/local/apache/conf.modules.d: No such file or directory
Does the directory listed in the error exist?0 -
httpd: Syntax error in -C/-c directive: Include/IncludeOptional: Could not open directory /usr/local/apache/conf.modules.d: No such file or directory
Does the directory listed in the error exist?
No But by creating it, the problem doesn't go away. This directory does not exist on any of the servers and the error is not received.0 -
This isn't a standard directory - it's being included in your configuration somewhere and because it doesn't exist and the expected include isn't present it's causing an issue. If you go to WHM>>Server Configuration>>Apache Configuration -> Include editor - Do you see any includes that reference this path? The standard path for this should be /etc/apache2/conf.modules.d/0 -
This isn't a standard directory - it's being included in your configuration somewhere and because it doesn't exist and the expected include isn't present it's causing an issue. If you go to WHM>>Server Configuration>>Apache Configuration -> Include editor - Do you see any includes that reference this path? The standard path for this should be
/etc/apache2/conf.modules.d/
Sorry, you cannot update the include files at this time. Your Apache configuration file currently has a syntax error. Error: The "/usr/local/apache/bin/httpd -DSSL -t -f /usr/local/apache/conf/httpd.conf -C Include "/usr/local/apache/conf.modules.d/*.conf"" command (process 75568) reported error number 1 when it ended. httpd_ls_bak: Syntax error in -C/-c directive: Could not open config directory /usr/local/apache/conf.modules.d: No such file or directory0 -
Can you show me the output of the following: stat /usr/local/apache/conf/httpd.conf
Includes are located at:/etc/apache2/conf.d/includes0 -
Can you show me the output of the following:
stat /usr/local/apache/conf/httpd.conf
Includes are located at:/etc/apache2/conf.d/includes
File: "/usr/local/apache/conf/httpd.conf" Size: 5430091 Blocks: 10608 IO Block: 4096 regular file Device: 802h/2050d Inode: 11678992 Links: 1 Access: (0600/-rw-------) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2019-09-23 15:15:50.229069966 +0330 Modify: 2019-09-23 15:15:50.261071019 +0330 Change: 2019-09-23 15:15:50.261071019 +0330 Birth: -0 -
File: "/usr/local/apache/conf/httpd.conf" Size: 5430091 Blocks: 10608 IO Block: 4096 regular file Device: 802h/2050d Inode: 11678992 Links: 1 Access: (0600/-rw-------) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2019-09-23 15:15:50.229069966 +0330 Modify: 2019-09-23 15:15:50.261071019 +0330 Change: 2019-09-23 15:15:50.261071019 +0330 Birth: -
i changed chmod to 0777 but problem is still0 -
Are you using EA3 or EA4? 0 -
600 is the correct permissions: [root@server includes]# stat /etc/apache2/conf/httpd.conf File: "/etc/apache2/conf/httpd.conf" Size: 250678 Blocks: 496 IO Block: 4096 regular file Device: fd01h/64769d Inode: 796858 Links: 1 Access: (0600/-rw-------) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2019-09-23 14:32:58.474083848 -0500 Modify: 2019-09-23 14:32:58.021083948 -0500 Change: 2019-09-23 14:32:58.113083927 -0500 Birth: -
The apache conf should NOT be 777 what I was looking for was a symlink to /etc/apache2/conf/httpd.conf0 -
Are you using EA3 or EA4?
EA4 and litespeed and cloudlinux 7.70 -
@httpdocs I'd open a ticket to have them take a look at the configuration - instructions to do so are located in my signature. If you do open a ticket please add the Ticket ID to this thread. 0 -
@httpdocs I'd open a ticket to have them take a look at the configuration - instructions to do so are located in my signature. If you do open a ticket please add the Ticket ID to this thread.
Unfortunately, it is currently not possible to post tickets0 -
Unfortunately, it is currently not possible to post tickets
What is the issue you're having with opening a ticket?0 -
What is the issue you're having with opening a ticket?
It's about managerial access and I can't send a ticket.0 -
I see, so, the issue i believe would lie in the templates for apache - for some reason it's referencing the old path at /usr/local/apache/ not /etc/apache2/conf.modules.d. If you search in the templates for the following what is the output? grep -ir "conf.modules.d" /var/cpanel/templates/0 -
I see, so, the issue i believe would lie in the templates for apache - for some reason it's referencing the old path at /usr/local/apache/ not /etc/apache2/conf.modules.d. If you search in the templates for the following what is the output?
grep -ir "conf.modules.d" /var/cpanel/templates/
Thank you for your cooperation command result: /var/cpanel/templates/apache2_4/ea4_main.default:Include "[% paths.dir_base %]/conf.modules.d/*.conf"0 -
Do you have anything that references /usr/local/apache
there as well? The output you're showing is expected. Ultimately the issue is, is that the incorrect path is being referenced in the apache conf - you might want to move the conf files located at/etc/apache2/conf/
and then rebuild the configuration and check if it still references the old path.0 -
Do you have anything that references
/usr/local/apache
there as well? The output you're showing is expected. Ultimately the issue is, is that the incorrect path is being referenced in the apache conf - you might want to move the conf files located at/etc/apache2/conf/
and then rebuild the configuration and check if it still references the old path.
i moved all included files into conf directory to old directory and rebuild httpdconf but problem is still -rw------- 1 root root 5434906 Sep 16 18:59 httpd.conf -rw------- 1 root root 501937 Sep 19 16:43 httpd.conf.datastore -rw-r--r-- 1 root root 13064 Sep 19 16:43 magic -rw-r--r-- 1 root root 61184 Oct 17 2018 mime.types0 -
/usr/local/apache is: 0 -
/usr/local/apache is:
0 -
The problem did not resolve.... I had to reinstall cPanel....0 -
Hello, Unfortunately I don't think that reinstalling cPanel was the most effective solution for the issue, I would have liked to have been able to see the issue investigated through a ticket as I see an identical report of this occurring in our ticket system which was resolved with the following: rpm -e --nodeps --justdb ea-apache24-config-runtime-1.0-154.el7.cloudlinux.noarch yum install ea-apache24-config-runtime-1.0-154.el7.cloudlinux.noarch0 -
Hello, Unfortunately I don't think that reinstalling cPanel was the most effective solution for the issue, I would have liked to have been able to see the issue investigated through a ticket as I see an identical report of this occurring in our ticket system which was resolved with the following:
rpm -e --nodeps --justdb ea-apache24-config-runtime-1.0-154.el7.cloudlinux.noarch yum install ea-apache24-config-runtime-1.0-154.el7.cloudlinux.noarch
Always reinstalling cPanel is the worst way to fix the problem. However, because the server was operational, I couldn't wait to fix it and had to reinstall and restore the backup. If this problem repeats again, I'd be happy to fix the problem together.:) Thank you ;)0 -
Hello, Unfortunately I don't think that reinstalling cPanel was the most effective solution for the issue, I would have liked to have been able to see the issue investigated through a ticket as I see an identical report of this occurring in our ticket system which was resolved with the following:
rpm -e --nodeps --justdb ea-apache24-config-runtime-1.0-154.el7.cloudlinux.noarch yum install ea-apache24-config-runtime-1.0-154.el7.cloudlinux.noarch
Hello cPanelLauren I have same issue now. This issue coming from ModSec I tried: rpm -e --nodeps --justdb ea-apache24-config-runtime-1.0-154.el7.cloudlinux.noarch yum install ea-apache24-config-runtime-1.0-154.el7.cloudlinux.noarch but does not work: error: package ea-apache24-config-runtime-1.0-154.el7.cloudlinux.noarch is not installed Same config: EA4 - Centos 7 - CloudLinux 7.7 - Litespeed - v84.0.170 -
Now I fixed: rpm -e --nodeps --justdb ea-apache24-config-runtime.noarch yum install ea-apache24-config-runtime.noarch 0 -
Now I fixed: rpm -e --nodeps --justdb ea-apache24-config-runtime.noarch yum install ea-apache24-config-runtime.noarch
I just used this code for similar issue and it worked... Thanks0
Please sign in to leave a comment.
Comments
26 comments