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.

Automatic index page when account is created?

Discussion in 'General Discussion' started by Vger, Nov 2, 2009.

  1. Vger

    Vger Registered

    Joined:
    Nov 2, 2009
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    I apologise if this has been asked before. I have searched but didn't find anything.

    We have our first WHM/cPanel server online. All others are Ensim Pro and I am used to a default homepage being created whenever a new site is added, but this does not appear to happen with WHM/cPanel.

    Presumably such a facility exists, but I need assistance on how to set things up so that any new account gets a default homepage.

    Many Thanks - Vger
     
  2. cpanelinfoseeker

    cpanelinfoseeker Well-Known Member

    Joined:
    Oct 25, 2002
    Messages:
    325
    Likes Received:
    3
    Trophy Points:
    18
    Location:
    NE Illinois
    cPanel Access Level:
    Root Administrator
    In WHM, look for "Account Functions" and choose "Skeleton Directory". This will show you where your directory is. Anything you add to your skel directory will automatically be added to the users directory when you create a new account.

    Ron
     
  3. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    That is correct; for example, if you place a default HTML page within the "public_html" sub-directory then it will be included within the public_html directory of the user's new account upon creation.

    Example paths:
    Code:
    /root/cpanel3-skel
    /root/cpanel3-skel/public_html
    /root/cpanel3-skel/public_html/index.html
     
  4. maderite

    maderite Registered

    Joined:
    Nov 4, 2009
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    is there a way to do this depending on the package assigned when creating an account.

    Lets say i host alot of istes on a certain php script and want the files added in when i assign a certain package for creation
    but if its just a standard hosting account i dont want it included.
     
  5. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    This should be possible by using a "hook" (i.e., "postwwwacct"); this could be a custom script that runs after a new account is created, and the custom script could perform specific actions based upon the package.

    Here is our related documentation that will help while getting started and while researching how to accomplish the automated provisioning based on the package:
    WebHome < AllDocumentation/AutomationIntegration < TWiki

    The following is a section within the above documentation, more specific to the request:
    Hooking into cPanel Functionality
    ScriptHooks < DevHooks < TWiki

    On the "ScriptHooks" page, I recommend reading about "postwwwacct" as detailed in the documentation.

    Moderator Note: So that your question can receive more relevant feedback and discussion I recommend posting in the Developer area of the forums: Developer Discussions - cPanel Forums
     
Loading...

Share This Page