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.

RE: New Account Creation Skeleton Template

Discussion in 'General Discussion' started by joneslee85, Sep 8, 2009.

  1. joneslee85

    joneslee85 Member

    Joined:
    Sep 8, 2009
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Hello everyone

    I would like to ask how to modify cPanel so I could achieve following:
    1. All new account is created with filesystem skel:
    production/public_html
    production/public_ftp

    staging/public_html
    staging/public_ftp
    (could this be done by modify /root/cpanel3-skel ??)

    2. Apache will automatically create 2 vhost that is:

    staging.domain.com --> staging/public_html
    domain.com --> production/public_html

    3. BIND automatically added sub-domain staging

    I believe that it is quite normal for a website to have staging for client review and it'd be faster if cpanel could automate this creation for me. Or if you have better approach, please share with me. Many thanks
     
  2. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    Yes this is possible but you'll need to do more than just update the skeleton.

    I would put hooks in the post processing script after accounts are created
    to also generate the corresponding subdomains on the account.

    Side FYI: Subdomains DO NOT have a /public_html or /public_ftp
     
  3. joneslee85

    joneslee85 Member

    Joined:
    Sep 8, 2009
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Thanks. I would like to ask why a subdomain could not have a /public_html since a subdomain is just like a normal main domain where you could have any folder structure as long as vhost is set up in accordance.

    Besides, since I am very new to CPanel, if you could help me write a Perl script hook, I'd be so grateful.

     
  4. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    That is just how things are laid out and is a common mistake for new users ....

    Maybe this will help ...

    The location where your web root (http://www.yourdomain.com/) is
    physically stored on the server hard drive for your main domain is as follows:

    /home/(login)/public_html/

    The location where the subdomain (http://sub.yourdomain.com/) is
    physically stored on the server hard drive is as follows by default:

    /home/(login)/public_html/(subdomain)/


    When you login to an account by FTP using the MASTER login for the
    account, it places you in your UNIX home folder but that is not where
    your web root is located so you are forced to change to /public_html
    after you connect with FTP:

    FTP with the master login puts you in: /home/(login)

    (Thus you need to change to "public_html" .... /home/(login)/public_html)

    However, when you login with the FTP login created for a subdomain on
    the same account, you are already put immediately into the web folder
    for the subdomain in /home/(login)/public_html/(subdomain) thus there
    is no need to change to any different folder before uploading files.

    When connecting with a FTP login for a subdomain, you are already at:

    /home/(login)/public_html/(subdomain)

    If you were to create a public_html folder under a subdomain,
    those files would be accessed on the web as follows:

    http://sub.domain.com/public_html/

    (I doubt very seriously if that is what you really intended to do! ;) )

    Hopefully this clears up things a little bit how files are stored and
    where you need to put your files when you login.

    No problem, contact me by private message and I'll give you my contact info.
     
    #4 Spiral, Sep 9, 2009
    Last edited: Sep 9, 2009
Loading...

Share This Page