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!

Changing default home directory 'public_html'

Discussion in 'General Discussion' started by Ramon Pego, Mar 12, 2019.

  1. Ramon Pego

    Ramon Pego Registered

    Joined:
    Mar 12, 2019
    Messages:
    4
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    Brazil
    cPanel Access Level:
    Root Administrator
    Hello, I have read some topics here on how to change the root directory of my accounts.
    I need it to be just 'public', instead of 'public_html'

    I already read a topic that says to change in:
    '/var/cpanel/userdata/USERNAME/DOMAIN.COM'
    I did but he says after that I need rebuild the:
    '/scripts/rebuildhttpdconf'
    What do you mean by that?
    beacuse did i change, restart apache and updated the browser and still did not change

    And I wish everyone would be like this, from now on.

    Topic

    Thx.
     
  2. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    5,815
    Likes Received:
    443
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hello @Ramon Pego


    First of all I want to point out that directory customization such as this is not something that cPanel supports. This means if you have issues with this customization our ability to provide assistance may be limited.

    To clarify those instructions you'd need to run the following:

    change this to what you need it to say:
    Code:
    documentroot: /home/USERNAME/public_html
    Then run the following commands:

    Code:
    /scripts/updateuserdomains
    /scripts/updateuserdatacache
    mv /etc/apache2/conf/httpd.conf{,.bk}
    /scripts/rebuildhttpdconf
    /scripts/restartsrv_httpd 
    You should be able to copy/paste those in order to achieve the desired goal.


    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    Ramon Pego likes this.
  3. Ramon Pego

    Ramon Pego Registered

    Joined:
    Mar 12, 2019
    Messages:
    4
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    Brazil
    cPanel Access Level:
    Root Administrator
    I'm very sorry for the delay, this worked great for me, i can made this change for the future created users?
     
    cPanelLauren likes this.
  4. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    5,815
    Likes Received:
    443
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @Ramon Pego


    If you need to yes, it should be fine, though we are going to be introducing the ability to customize the homedir in a future release of cPanel/WHM
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice