•  Home
  •  Dashboard
  •  Company
    • About Us
    • Blog
    • Careers
    • Contact Us
    • Data Centers
    • Looking Glass
    • Network
    • Reseller
  •  Hosting Services
    • Infrastructure
      • iColocation
    • Compute
      • cMetal
      • cVirtual
    • Storage
      • sObject
      • sBlock
    • Networking
      • nCDN
      • nIP Transit
      • nWavelength
    • Protection
      • pBackup
      • pDDoS
  •  Solutions
    • Ecommerce
    • Finance
    • Gaming
    • Hosting
    • Management
    • Security
    • System Integrator
  •  Support
    • Community
    • Knowledge Base
    • Open A Ticket
  •  USA & Canada: 800-933-1517
  •  International: 626-549-2801
  •  Email: sales@psychz.net
  • Services
    • new-colocation-header-img
      Infrastructure
      • iColocation
    • new-compute-header-img
      Compute
      • cMetal
      • cVirtual
    • new-storage-header-img
      Storage
      • sObject
      • sBlock
    • new-networking-header-img
      Networking
      • nCDN
      • nIP Transit
      • nWavelength
    • new-protection-header-img
      Protection
      • pBackup
      • pDDoS
  • Solutions
    • Ecommerce
    • Security
    • Gaming
    • Hosting
    • Management
    • Finance
    • System Integrator
  • Dashboard

How to update root document path for a website in cPanel?

  • Home
  • Client
  • Qa Forum
  • How to update root document path for a website in cPanel?

Posted By: Andrew | 1 Replies | Last Reply On: Apr 10, 2017 08:54:39

I am trying to change the website root path in cPanel.  Instead of loading files from public_html, I would like to set root document path to /public_html/folder/folder

How to achieve this setup?

Psychz - Mark

Votes: 0Posted On: Apr 10, 2017 08:54:39
 

You will need to log into the server as root and perform the following -

  1. Login as root

  2. vi /var/cpanel/userdata/USERNAME/DOMAIN.COM
  3. Press "i" for Vi editor and edit the line with "documentroot:" path and save the file using "esc + :wq"

  4. vi /var/cpanel/userdata/USERNAME/DOMAIN.COM_SSL
  5. Make similar changes to make sure it works for SSL

  6. /scripts/rebuildhttpdconf
  7. service httpd restart

Was this reply helpful?

Related topics

  • How To Secure cPanel?
  • Basic and useful Linux commands
  • How to free up disk space on a cPanel server
  • How to change root password in linux?
  • Hosting With Root Access
  • Managed cPanel Dedicated Server
  • DDoS Protected Hosting
  • How to create website using cPanel?
  • Top Hosting Control Panels For Linux
  • Top Useful Features Of Linux Mint
  • EasyApache 4: better than ever?
  • How To Setup Application Load Balancer Using CDN
  • Reference Architecture - Dedicated Server Deployment
  • Reference Architecture - Active-Active Configuration (Using CDN)
  • Installing MariaDB on Centos 7
Copyright © 2025 Psychz Networks,
A Profuse Solutions Inc Company
Hosting Services
Infrastructure
  • iColocation
Compute
  • cMetal
  • cVirtual
Storage
  • sObject
  • sBlock
Networking
  • nCDN
  • nIP Transit
  • nWavelength
Protection
  • pBackup
  • pDDoS
Company
  • About Us
  • Blog
  • Careers
  • Contact Us
  • Data Centers
  • Looking Glass
  • Network
  • Reseller
Policies
  • Acceptable Usage Policy
  • Privacy Policy
  • Service Level Agreement
  • Terms and Conditions
Support
  • Community
  • Knowledge Base
  • Open A Ticket
Get In Touch
  • Psychz Networks,
    A Profuse Solutions Company
    611 Wilshire Blvd #300
    Los Angeles,California 90017
    USA
  • US/Canada: 800-933-1517
  • International: 626-549-2801