Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

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.

Sites in Root or Public_html?

Discussion in 'General Discussion' started by Eladnova, Feb 7, 2018.

  1. Eladnova

    Eladnova Registered

    Joined:
    Feb 2, 2018
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Dublin
    cPanel Access Level:
    Website Owner
    Hi guys

    Brand new to cPanel as I normally use Plesk but I'm liking it a lot.

    One thing I'd love to know from veteran users.
    I have a new Shared Hosting account with A2 hosting and can host "unlimited sites". In reality I just want to store about 20 separate client sites which are relatively low on resources.

    Is there drawback to storing my client addon domains in the root instead of my public_html folder?

    I like the idea of separate spaces and realise I'll have to preview using a host file. But other than that are there any development, technical, SEO, strategic drawbacks to this approach?

    Many thanks
     
  2. Eminds

    Eminds Well-Known Member

    Joined:
    Nov 10, 2016
    Messages:
    249
    Likes Received:
    17
    Trophy Points:
    18
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Well the scenario you have mentioned can be done however you will have to work alot on permissions hence storing the websites in public_html is the folder where the webfiles has to be placed.

    Regarding the approach you have mentioned , I don't think there are any strategic drawbacks.
     
  3. Eladnova

    Eladnova Registered

    Joined:
    Feb 2, 2018
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Dublin
    cPanel Access Level:
    Website Owner
    Thank you for answering @Eminds
    Would you mind giving me an example of potential permissions problems. Are these permission issues for general front end views of the site?
    Currently I've setup host access and can connect to the site and database fine.
     
  4. cPWilliamL

    cPWilliamL cP Technical Analyst II
    Staff Member

    Joined:
    May 15, 2017
    Messages:
    257
    Likes Received:
    27
    Trophy Points:
    103
    Location:
    America
    cPanel Access Level:
    Root Administrator
    Hi @Eminds
    Perhaps they are referencing WHM > Tweak Setting "
    Restrict document roots to public_html"(publichtmlsubsonly). If you are not restricted to 'public_html', I'd recommend using the account's homedir(e.g. /home/username/addon.com/). This provides a bit better segregation, which can be very helpful in the event of a compromise. Should everything be placed in 'public_html', one site compromise would very likely result in all sites littered with malware. It's still possible that additional domains placed in the user's homedir could be infected from other addon domains within the same account; however, it is less likely.
     
Loading...

Share This Page