Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Member
    Join Date
    May 2010
    Posts
    10

    Default Custom Apache Directive Cleanup

    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?
    Last edited by teknosoul; 05-10-2010 at 02:25 PM.

  2. #2
    Member
    Join Date
    May 2010
    Posts
    10

    Default

    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:

    <VirtualHost IP:80>
    ServerName mydomain.com
    ServerAlias www.mydomain.com
    DocumentRoot /home/user/public_html
    ServerAdmin webmaster@mydomain.com
    ## User user # Needed for Cpanel::ApacheConf
    <IfModule mod_suphp.c>
    suPHP_UserGroup user user
    </IfModule>
    <IfModule !mod_disable_suexec.c>
    SuexecUserGroup user user
    </IfModule>
    CustomLog /usr/local/apache/domlogs/mydomain.com-bytes_log "%{%s}t %I .\n%{%s}t %O ."
    CustomLog /usr/local/apache/domlogs/mydomain.com combined
    ScriptAlias /cgi-bin/ /home/user/public_html/cgi-bin/
    </VirtualHost>

    <VirtualHost IP:80>
    ServerName sub.mydomain.com
    ServerAlias www.sub.mydomain.com
    DocumentRoot /home/user/public_html/m
    ServerAdmin webmaster@sub.mydomain.com
    UseCanonicalName On
    CustomLog /usr/local/apache/domlogs/sub.mydomain.com combined
    CustomLog /usr/local/apache/domlogs/sub.mydomain.com-bytes_log "%{%s}t %I .\n%{%s}t %O ."
    ## User user # Needed for Cpanel::ApacheConf
    <IfModule mod_suphp.c>
    suPHP_UserGroup user user
    </IfModule>
    <IfModule !mod_disable_suexec.c>
    SuexecUserGroup user user
    </IfModule>
    ScriptAlias /cgi-bin/ /home/user/public_html/m/cgi-bin/


    # To customize this VirtualHost use an include file at the following location
    # Include "/usr/local/apache/conf/userdata/std/2/user/sub.mydomain.com/*.conf"

    </VirtualHost>

    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. #3
    cPanel Staff cPanelMatt's Avatar
    Join Date
    Apr 2005
    Location
    Houston, TX
    Posts
    409

    Default

    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.
    Matt Dees
    Integration Developer
    cPanel, Inc.
    cPanel Integration Blog

Similar Threads & Tags
Similar threads

  1. Why doesn't my custom virtual directive includes appear in the httpd.conf?
    By robertnorris in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 04-25-2011, 05:17 PM
  2. virtualhost custom directive problem
    By ironmanjakarta in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 05-19-2008, 01:56 PM
  3. Custom VirtualHost Directive Syntax
    By jayronc in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 04-23-2008, 03:23 PM
  4. AcceptPathInfo directive in apache 1.37?
    By fikse in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 11-26-2006, 07:42 AM
  5. Apache upgrade overwrites DirectoryIndex directive
    By steve.deobald in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 12-13-2004, 07:47 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube