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 Apache Directive Cleanup

Discussion in 'cPanel Developers' started by teknosoul, May 10, 2010.

  1. teknosoul

    teknosoul Member

    Joined:
    May 3, 2010
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    When changing the owner of a domain, does cPanel automatically cleanup anything that was in:

    /usr/local/apache/conf/userdata/(ssl|std)/(1|2)/<user>/<domain>/

    For instance, if I had directives in mydomain.com owned by user1 in the directory:

    /usr/local/apache/conf/userdata/std/2/user1/mydomain.com

    and changed the owner to user2, what happens to the files in there?
     
    #1 teknosoul, May 10, 2010
    Last edited: May 10, 2010
  2. teknosoul

    teknosoul Member

    Joined:
    May 3, 2010
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Also, why doesn't a Virtualhost for something like mydomain.com have the include directive for custom directives, but subdomains do. Here is an example of what I'm seeing:


    Why is there no directives for the Include on mydomain.com but there is a commented out one on sub.mydomain.com - and how do I enable these?
     
  3. MattDees

    MattDees cPanel Product Owner
    Staff Member

    Joined:
    Apr 29, 2005
    Messages:
    417
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    I believe that the apache userdata system is non-dynamic, meaning that if you modify a username or owner, you will have to manually (or script) the directory change.

    As for ensuring that the includes get used, please see:

    cPanel - Apache Configuration System - Internal WHM & cPanel Changes

    specically /scripts/ensure_vhost_includes (it takes a --help flag..)

    LMK if you need assistance with using this script.
     
Loading...

Share This Page