The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Custom user data being included in httpd.conf in EA4

Discussion in 'EasyApache' started by verdon, Apr 16, 2016.

  1. verdon

    verdon Well-Known Member

    Joined:
    Nov 1, 2003
    Messages:
    836
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Northern Ontario, Canada
    cPanel Access Level:
    Root Administrator
    Hi,

    I 'seem' to be having an issue with custom user data includes, actually being included in the httpd.conf. Specifically, I use 'ConfigServer ModSecurity Control' for whitelisting the occasional modsec rule, for specific domains... has always worked in the past.

    I have verified that it is creating the files
    /etc/apache2/conf.d/userdata/std/2_4/username/modsec.conf
    /etc/apache2/conf.d/userdata/ssl/2_4/username/modsec.conf

    and I have verified that it is adding the line to the virtual domain container
    Include "/etc/apache2/conf.d/userdata/std/2_4/username/*.conf"

    and it seems to be restarting apache, but I don't believe the contents of /etc/apache2/conf.d/userdata/std/2_4/username/modsec.conf are actually being included.

    Can anyone suggest a way I can verify what's going on?
     
  2. verdon

    verdon Well-Known Member

    Joined:
    Nov 1, 2003
    Messages:
    836
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Northern Ontario, Canada
    cPanel Access Level:
    Root Administrator
    I guess what I'm really asking is, is there a way to see the currently loaded httpd configuration, including the contents of all include directives?
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,852
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  4. verdon

    verdon Well-Known Member

    Joined:
    Nov 1, 2003
    Messages:
    836
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Northern Ontario, Canada
    cPanel Access Level:
    Root Administrator
    Thanks @cPanelMichael,

    I did find a simple test case and was able to verify that ConfigServer's wonderful tool is indeed working as expected. My client must have had something else going on, that I haven't been able to reproduce yet.

    That said, I'd still be interested if anyone knew a reliable means to get the complete content (including the content of all includes) from the currently loaded httpd configuration.
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,852
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  6. verdon

    verdon Well-Known Member

    Joined:
    Nov 1, 2003
    Messages:
    836
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Northern Ontario, Canada
    cPanel Access Level:
    Root Administrator
    Thanks. I'll revisit that. I took a quick glance at it before, but thought it was missing the user includes... may have been me though :)
     
  7. verdon

    verdon Well-Known Member

    Joined:
    Nov 1, 2003
    Messages:
    836
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Northern Ontario, Canada
    cPanel Access Level:
    Root Administrator
    It's a good post. Unfortunately, the python script mentioned in it looks like a good idea but doesn't work. I'll have to see if I can learn enough python to figure out why ;-) ;-) It looks pretty straight fwd.
     
Loading...

Share This Page