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.

Change default public_html dir?

Discussion in 'Bind / DNS / Nameserver Issues' started by Teodor Dumitrescu, Jan 13, 2016.

  1. Teodor Dumitrescu

    Teodor Dumitrescu Registered

    Joined:
    Jan 13, 2016
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Romania
    cPanel Access Level:
    Reseller Owner
    Hello guys,

    I changed hosting contract to a higher level of services and gained access to cpanel and created a user in WHM portal.

    After that the default html folder is not /var/www anymore but /home/newuser/public_html.

    How can I change it back?
     
  2. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,145
    Likes Received:
    34
    Trophy Points:
    48
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hello :),

    cPanel is creating default document root under the path as mentioned /home/USER/public_html/ and it is default. You need to upload your site content under pubic_html directory of your user.
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

    You can't change the document root for a cPanel account without root access. However, even if you could, you should use the "/home/$username/public_html" directory and modify any scripts with hard-coded paths away from the older directory structure.

    Thank you.
     
  4. Teodor Dumitrescu

    Teodor Dumitrescu Registered

    Joined:
    Jan 13, 2016
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Romania
    cPanel Access Level:
    Reseller Owner
    Is it possible using a SSH conection or terminal to configure it the way it was? The application I have on the website somehow relates to that folder /var/www.
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    You will need to update the configuration file for the script with the correct document root. You may want to consult with the developer of the script to determine what in particular you must change.

    Thank you.
     
Loading...

Share This Page