How do I change the document web root of an existing website

New VPS - and I’ve installed a domain/website. I need to change the document web root on this domain to point to a specific folder (like, public_html/folder).

I haven’t been able to find where this can be done. I’ve done it in cPanel, but this CyberPanel is new to me.

Thanks!

Hello @gene

You can go to List Websites → mydomain.com → vHost Conf and change this line

docRoot                   $VH_ROOT/public_html   <---- to $VH_ROOT/public_html/mydir
vhDomain                  $VH_NAME
vhAliases                 www.$VH_NAME
adminEmails               [email protected]
enableGzip                1
enableIpGeo               1

OR (not recommended)

You can change the document root by editing the root of the virtual host in OLS $DOC_ROOT. Go to https://SERVER_URL:7080/ → Virtual Hosts → mydomain.com → General → Document Root (change this)

1 Like

Perfect - Thank you so much Joseph!

This topic was automatically closed 3 hours after the last reply. New replies are no longer allowed.