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.

accessing root-level from addon domain

Discussion in 'General Discussion' started by mikabee, Jun 15, 2016.

Tags:
  1. mikabee

    mikabee Registered

    Joined:
    Jun 15, 2016
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Finland
    cPanel Access Level:
    Website Owner
    I have recently purchased 4 domains and a webhotel running cPanel. I have been able to configure it so that one of the domains is the primary one and 3 others as addon domains using subfolders. This is the desired setup to have them as separate sites and not as subdomains. So the folder structure is like this:
    - /public_html/index.html (frontpage of main domain)
    - /public_html/addon1/index.html (frontpage of first addon domain)
    - /public_html/addon2/index.html (frontpage of second addon domain)
    - /public_html/addon3/index.html (frontpage of third domain)
    - /public_html/common/ (shared resources)

    However, all of the sites/domains share some common resources like images, scripts and other libraries. Instead of copying and maintaining same files in 4 locations, I would like to use them from a shared folder in the root folder. For some reason it does not work. If I have in my html-code references like "<img src='/common/image1.jpg>' it works only for the main domain but not for the addon domains. There is no error messages, only the image (or other resources) are not loaded.

    How can this be achieved/configured with cPanel?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    653
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    This seems like an issue with your HTML coding. Try using the full path to the image (e.g. /home/$username/public_html/common/image.jpg) to see if that makes a difference.

    Thank you.
     
Loading...

Share This Page