3 Nov 2021

how to change primary Domain Document Root path in cPanel/WHM

Very carefully and very easy steps

  1.  Login to WHM/C-panle
  2. Open "Terminal" in WHM or use SSH for root user
  3. Go to this path "/var/cpanel" using command "cd var/cpanle/"
  4. Then enter "cd userdata"
  5. Then check the list of files using "ls"command
  6. here you can see your list username's for that domain like "samcpanle"
  7. then type "ls"
  8. Then enter your username (cd xyz) here you can see the domain files
  9. Then got to root folder
  10. Then edit the file here "vim /var/cpanel/userdata/samcpanle/sam.com" >> add "/public" - in 2 place. 
    1. Using vim editor VIM basic commands Enter-"i", Out-"ESC", Save-":wq".
  11. Then edit here "vim /var/cpanel/userdata/samcpanle/sam.com_SSL" >> add "/public" - in 1 palce
  12. Then remove the domain cache "rm -vf /var/cpanel/userdata/samcpanle/sam.com.cache"
  13. Then remove the domain SSL cache "rm -vf /var/cpanel/userdata/samcpanle/sam.com_SSH.cache"
  14. Then update this file using this command "/scripts/updateuserdatacache"
  15. Then rebuilt command "/scripts/rebuildhttpdconf"
  16. Then restart your server "service httpd restart"
Not check it your domain, its working …..





No comments:

Post a Comment