Very carefully and very easy steps
- Login to WHM/C-panle
- Open “Terminal” in WHM or use SSH for root user
- Go to this path “/var/cpanel” using command “cd var/cpanle/”
- Then enter “cd userdata”
- Then check the list of files using “ls”command
- here you can see your list username’s for that domain like “samcpanle”
- then type “ls”
- Then enter your username (cd xyz) here you can see the domain files
- Then got to root folder
- Then edit the file here “vim /var/cpanel/userdata/samcpanle/sam.com” >> add “/public” – in 2 place.
- Using vim editor VIM basic commands Enter-“i”, Out-“ESC”, Save-“:wq”.
- Then edit here “vim /var/cpanel/userdata/samcpanle/sam.com_SSL” >> add “/public” – in 1 palce
- Then remove the domain cache “rm -vf /var/cpanel/userdata/samcpanle/sam.com.cache”
- Then remove the domain SSL cache “rm -vf /var/cpanel/userdata/samcpanle/sam.com_SSH.cache”
- Then update this file using this command “/scripts/updateuserdatacache”
- Then rebuilt command “/scripts/rebuildhttpdconf”
- Then restart your server “service httpd restart”
Not check it your domain, its working …..