Skip to main content

rebuild httpdconf problem

Comments

26 comments

  • cPanelLauren
    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
  • httpdocs
    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
  • cPanelLauren
    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
  • httpdocs
    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 directory
    0
  • cPanelLauren
    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
    0
  • httpdocs
    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
  • httpdocs
    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 still
    0
  • cPanelLauren
    Are you using EA3 or EA4?
    0
  • cPanelLauren
    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.conf
    0
  • httpdocs
    Are you using EA3 or EA4?

    EA4 and litespeed and cloudlinux 7.7
    0
  • cPanelLauren
    @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
    @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 tickets
    0
  • cPanelLauren
    Unfortunately, it is currently not possible to post tickets

    What is the issue you're having with opening a ticket?
    0
  • httpdocs
    What is the issue you're having with opening a ticket?

    It's about managerial access and I can't send a ticket.
    0
  • cPanelLauren
    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
  • httpdocs
    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
  • cPanelLauren
    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
  • httpdocs
    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.types
    0
  • httpdocs
    /usr/local/apache is:
    0
  • httpdocs
    /usr/local/apache is:

    0
  • httpdocs

    The problem did not resolve.... I had to reinstall cPanel....
    0
  • cPanelLauren
    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
    0
  • httpdocs
    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
  • Burti
    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.17
    0
  • Burti
    Now I fixed: rpm -e --nodeps --justdb ea-apache24-config-runtime.noarch yum install ea-apache24-config-runtime.noarch
    0
  • 247NaijaBuzz
    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... Thanks
    0

Please sign in to leave a comment.