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.

/scripts/ensure_vhost_includes --user=name - No longer works.

Discussion in 'General Discussion' started by jols, Mar 29, 2011.

  1. jols

    jols Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,111
    Likes Received:
    2
    Trophy Points:
    38
    Hi,

    I used to be able to add an include file for an individual account in the httpd.conf, and then lock it in with:

    /scripts/ensure_vhost_includes --user=(account user id)

    But these days the above command just removed the custom include line that I just inserted.

    In the individual vsite areas of the httpd.conf file, we have this:

    # DO NOT EDIT. AUTOMATICALLY GENERATED. IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.

    That's fine, but none of the include lines in the vsite area are account specific. So if I included, in this case, the mod_security exception rule needed for this particular site. This rule would apply to every account on the server, which is not what we need here:

    Include "/usr/local/apache/conf/userdata/*.conf"
    Include "/usr/local/apache/conf/userdata/*.owner-root"
    Include "/usr/local/apache/conf/userdata/std/*.conf"
    Include "/usr/local/apache/conf/userdata/std/*.owner-root"
    Include "/usr/local/apache/conf/userdata/std/2/*.conf"
    Include "/usr/local/apache/conf/userdata/std/2/*.owner-root"


    So how can I put up a custom include rule just for one particular vsite?

    Thanks much.
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    You would put it into /usr/local/apache/conf/userdata/std/2/username/*.conf location where username is the cPanel username *.conf is the name of the include file such as modsec.conf for example.

    The documentation on using these includes can be found at the following location:

    Changes Contained within a VirtualHost Directive
     
  3. jols

    jols Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,111
    Likes Received:
    2
    Trophy Points:
    38
    Thanks but the problem is, you can't alter any of the existing includes, nor insert any new includes with "/username", if you do it's removed after running /scripts/ensure_vhost_includes --user=name
     
  4. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    If the entry that it should be placing into httpd.conf (you don't manually place the entry into httpd.conf) is being removed on running the command, then please open up a ticket and post the ticket number here. I've never heard of this happening. You can open up a ticket in WHM > Support Center > Contact cPanel or using the link in my signature.
     
Loading...

Share This Page