1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Subdomain not displaying my content

Discussion in 'Site & Server Administration' started by vgeo, Aug 30, 2017.

  1. #1
    Hi, folks.

    I want to learn front and back-end web development so that means I'm at the beginning of the road. I found some simple template that I wanted to remake and make it available on some subdomain of my website.
    However, things did not go as expected. Apparently, the new subdomain is not displaying the content I put into public_html, but it shows the index.html of the first page which is simply:
    "Test.".
    Therefore, it doesn't make sense. It shows some content that it doesn't belong to. You can see in this picture the content of that subdomain I called 'garbage'.
    http://i.imgur.com/uIJHY6D.png

    I hope you can clarify it for me.

    Thanks in advance, buddies!
     
    Solved! View solution.
    vgeo, Aug 30, 2017 IP
  2. BenZ-AMS

    BenZ-AMS Greenhorn

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    1
    Trophy Points:
    21
    #2
    What is the DocumentRoot for the subdomain?
     
    BenZ-AMS, Aug 30, 2017 IP
  3. RHS-Chris

    RHS-Chris Well-Known Member

    Messages:
    1,007
    Likes Received:
    35
    Best Answers:
    10
    Trophy Points:
    150
    #3
    Hello there,
    • Have you set up the DNS for the subdomain already (garbage.domain.tld)?
    • You can also access the folder using the main domain and adding the folder (domain.tld/garbage), to test to ensure it loads.
    • You need to make sure that any CSS or other linked information is using the subdomain as well, or relative paths.
    Regards,
    Chris
     
    RHS-Chris, Aug 30, 2017 IP
  4. vgeo

    vgeo Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    3
    #4
    Hi, Benz.

    I guess that by DocumentRoot, you mean the folder of the subdomain. Well, if so, it should be the one located in public_html.

    Hi, Chris.

    Yes, the DNS should be up for 1 day already.
    The thing is that when I made the subdomain through the cPanel, the folder 'garbage' went straight into '/'(root folder), even if it should be in public_html.
    I doubt it requests any particular path since its creator didn't mention any of that requirement.

    The subdomain got up on the internet but it still shows the wrong content. The main domain domain.tld has a simple .html document and within it's only written 'Test.'. The new subdomain has its own folder but of course different from the index of the main domain. That bothers me.

    Thanks for the tips.
     
    vgeo, Aug 30, 2017 IP
  5. #5
    Are you sure?

    What web server are you using?

    What specifically is set for the DocumentRoot in the webserver's configuration for this subdomain?
     
    BenZ-AMS, Aug 30, 2017 IP
  6. vgeo

    vgeo Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    3
    #6
    This question answered my question. Somehow, the DocumentRoot was set on the public_html directory, not specifically on the one called 'gargabe'. I don't think it slipped through my fingers since I double checked both through the FTP client and the cPanel. The weird thing as I said, is that it didn't set up into public_html but into the root folder.

    Anyway, I checked again the list of subdomains and updated the DocumentRoot.

    Thanks a lot!
     
    vgeo, Aug 30, 2017 IP