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.

cpanel accounts accessing document root of another account?

Discussion in 'General Discussion' started by myjquerylife, Oct 18, 2010.

  1. myjquerylife

    myjquerylife Registered

    Joined:
    Oct 18, 2010
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    I have wiredtree.com vps that runs
    WHM 11.26.20
    CENTOS 5.5 i686 virtuozzo on host

    I am building a site builder product.

    so I have MYDOMAIN.com that has the program to create sites.

    Lets say I get a customer CUSTOMER.COM, I want to be able to create a cpanel account that allows them to manage their email accounts and put a limit on their bandwidth use, thats it (this is easy enough to control)... But my question is it possible to have CUSTOMER.com point to the document root of MYDOMAIN.com?
     
  2. 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:
    If the client domain "customer.tld" will be on the same cPanel account as your primary domain "mydomain.tld" then it is possible to easily setup both using the same document root. By default, parked domains will use the same document root as the primary domain of an account. When adding the client domain, I would consider using parked domains via cPanel.

    Reference menu path and documentation: cPanel: Main >> Domains >> Parked Domains
     
  3. myjquerylife

    myjquerylife Registered

    Joined:
    Oct 18, 2010
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Is their a way to achieve what I am after that allows me to limit bandwith use?

    From here:
    Parked Domains

    It looks like parked domains don't have separate stats. Also I would prefer they have their own cpanel account that way if they send spam or something and the hosting provider killed the offending account it would be their cpanel account not my account.

    Any ideas?

    i want customer.tld to have a separate cpanel from mysite.tld (main account), but have its document root be mysite.tld's

    I of course won't give customer.tld ftp, mysql, I won't give them access to the cpanel its self, I will through my own admin and the cpanel API give them access to add/edit/delete email address's and that it.

    I just need to isolate each customer for bandwidth monitoring and incase they do something inappropriate that causes an account to get suspended it only effects them.

    Any ideas? maybe separate cpanels is not the answer, I am new to all of this...
     
    #3 myjquerylife, Oct 18, 2010
    Last edited: Oct 18, 2010
  4. 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:
    I am not aware of a safe way to have different accounts use the same document root. Have you considered duplicating the site builder installation on each account?
     
  5. myjquerylife

    myjquerylife Registered

    Joined:
    Oct 18, 2010
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    I have considered duplicating, but then it would require hosting multiple copies of the same files...

    not to mention upgrading the custom site-builder on each account... I am looking for a SaaS, where I push the updates to the server and all is well.

    so you mention that you are not sure of "a safe way to have different accounts use the same document root"

    What is the unsafe way? Also if the client does not receive their cpanel username/password why would it be unsafe?

    Thanks
     
  6. 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:
    The unsafe way, in my opinion, would be to manually modify the Apache configuration to make other accounts use the same document root; this may not work and I would not consider trying it. If there will be any scripts used on the site they should be ran as the user owning the virtual host; this is possible using both suEXEC and suPHP, and attempting to circumvent the protections these mechanisms offer would pose a security complication as you may, potentially, have multiple different users executing and writing to the same paths.

    I would consider trying the ScriptAlias directive in the Apache/httpd configuration to point to a shared installation of your software:
    Code:
    ScriptAlias /sitebuilder /path/to/your/shared/sitebuilder
    Please refer to the official Apache/httpd documentation for usage information: ScriptAlias Directive - mod_alias - Apache HTTP Server

    Custom Apache directives can be added using WebHost Manager via the following menu path (with linked documentation): WHM: Main >> Service Configuration >> Apache Configuration >> Include Editor
     
Loading...

Share This Page