Skip to main content

Changing Document Root for main domain

Comments

11 comments

  • cPRex Jurassic Moderator

    Hey there!  Changing the document for the main domain has always involved either modifying and restoring the account (the safe option) or the more dangerous option of manually editing several different files on the command line.  Because of the risks involved with that manual procedure we have removed those instructions - if the operation isn't performed properly it can keep Apache from starting.

    Can you confirm you tried this work on a version 120 machine? 

    0
  • Ben Taylor

    Hi cPRex, I have only tried this on v110.0.39. I never got it to work though as it said my system does not have an IP which is confusing. Though the documentation(safe option) does seem incomplete by not telling you to either change the primary domain back or fix the broken sub domains. luckily when I changed it back after it failed my sub domains were restored.

    With the documentation lacking this part I am reluctant to try it on a new server as we have a lot of subdomains with client apps on

    0
  • cPRex Jurassic Moderator

    Let me do some testing with this today and I'll send you an update once I have more details.

    0
  • cPRex Jurassic Moderator

    Alright - I confirmed the steps in that article will change all subdomains associated with that main domain.  Since that is the case, I have removed this article.

    Like I mentioned before, this can only be done by adjusting the cPanel configuration files directly on the command line, which is why we don't provide these steps.

    0
  • Ben Taylor

    This is a frustrating situation because I can no longer use my main domain. We recently moved from WordPress to Laravel, where the document root is within the "public" directory of the main app folder. To use public_html on our main company's domain, I would need to move all of Laravel's files into the user account folder and figure out how to change Laravel's document root to public_html.

    Not only would this create a mess in the user account folder, but managing a GitHub repository in that folder would also be incredibly awkward.

    Is there no way for me to find out how to do this with CLI?

    0
  • cPRex Jurassic Moderator

    Unfortunately I don't have any details I can provide on this one.  I know this doesn't help you right now with this issue, but I would recommend submitting a feature request over at features.cpanel.net requesting and easy way to perform that docroot change.  I'll be sure that gets in front of the right team for review.

    0
  • Ben Taylor

    Hi cPRex,

    I have sent in a feature request. Though I forgot to mention the SEO implications of this particular case.

    We had to redirect everything from the main domain to a subdomain. The main domain has been registered and indexed for almost 30 years and now we've done a permanent 301 redirect on everything. it's saddening.

     

    0
  • cPRex Jurassic Moderator

    I did see the request come in and we'll likely talk it about it in today's meeting!

    0
  • cPRex Jurassic Moderator

    So...this was a fun discussion - and sorry for not updating on Friday.

    In general, cPanel is sloooooowwwwwly trying to remove and change the concept of a domain as defined in the cPanel system.  For decades we've had parks and addons and aliases and subdomains, but they were all tied to a "main" account, which leads to confusion and difficulty whenever someone wants to split these to their own account.

    The cPanel team leader is working to change this (slowly, like I mentioned...it's integrated into every area of the product) and he's added this to his case of things that need to get handled as part of the change.

    So far now, there isn't going to be an easy fix, but this will be part of a larger change that will happen in the future.

    0
  • Ben Taylor

    I'm uncertain about the future of domains within cPanel accounts based on what you've mentioned, but for now, it would be ideal to restore our main domain. It's essential that the primary company website is hosted on the main domain rather than a subdomain. Any pointers to the proper way to do this?

    0
  • cPRex Jurassic Moderator

    I wouldn't have any details on that - it would be best to make a ticket so this can be investigated and data loss avoided.

    0

Please sign in to leave a comment.