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 httpd.conf / DirectoryIndex

Discussion in 'General Discussion' started by manager23, Aug 15, 2013.

  1. manager23

    manager23 Member

    Joined:
    Aug 13, 2013
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hello,

    I have 2 seperate accounts on cpanel. What I want to do I want to connect one account to the directory index from the other account. It is a Magento webshop. I need to set a other Document Root for this regarding:
    hxxp://www.magentocommerce.com/knowledge-base/entry/tutorial-multi-site-multi-domain-setup


    Regarding the cpanel manual I have created a custom httpd.conf into the directory

    /usr/local/apache/conf/userdata/std/2/username/userdomain.nl/httpd.conf


    Into this custom httpd.conf file I putted the code below.

    DocumentRoot /home/otheraccount/public_html




    After running

    /scripts/verify_vhost_includes --commit


    This is succesfull included into the main httpd.conf file.

    When I go to the specific domain I got an Internal Server Error


    Does someone know how to fix this ?
     
    #1 manager23, Aug 15, 2013
    Last edited by a moderator: Aug 15, 2013
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    You can modify the document root for a domain name by editing the "documentroot" entry in the appropriate cPanel user data file:

    Code:
    /var/cpanel/userdata/$username/$domain.com
    This is recommended over using an Apache include file. However, the "500" error message likely stems from attempting to access files from one account that are owned by another username. Using a path to files from another account is not recommended. Ideally, you should simply upload the same set of files to both accounts. Or, since you own both of the websites, you could make one of the accounts an Add-On domain name to the other instead of keeping them as two separate accounts.

    Thank you.
     
  3. manager23

    manager23 Member

    Joined:
    Aug 13, 2013
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi Michael,

    I know it is also a option to do it by the user data file.

    The problem is indeed I want to acces another account. I want to do it this way because the Magento webshop says this is the correct way.

    I first had add on domains for it, but with that the problem is I cannot assign a SSL certicate to each domain.

    It was also not possible to connect 3 different to domains to 1 IP which is not the shared IP.

    Uploading files to both is not prefered, because then we have to manage always 3 set of the same files. Magento has to option to manage 3 frontend shops from 1 backend installation.

    Do you know how it is possible how to connect 1 account to the document root of another account?

    Thanks
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    It's now possible to assign multiple SSL certificates on the same IP address if you are using cPanel version 11.38 with an OS that supports SNI (e.g. CentOS 6, Red Hat Enterprise 6). Addon domain names are automatically assigned the IP address of the account, no matter if it's a dedicated or shared IP.

    Sharing a document root may be possible with a different PHP handler (e.g. DSO instead of suPHP) but it's generally not recommended due to the security risk in doing so.

    Thank you.
     
  5. manager23

    manager23 Member

    Joined:
    Aug 13, 2013
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Must I make specifc cpanel settings to make this working?

    I think I tried it before but got erros from the certificate, is is always taking 1 cert not the other 2 per domain.

    I got errors in the certificate that the domain is incorrect.
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Please open a new thread with the specific error messages you are receiving when attempting to install multiple certificates on the same IP address. This will allow us to focus on each issue individually.

    Thank you.
     
Loading...

Share This Page