Change Default Web Root Directory...
I recently purchased webhosting account and configured my default web directory to "public_html". I need to change it to point to my own directory. How can I do it? I researched and found that I need root access to ssh to be able to do it. If it is correct, Can anyone tell me how to request for root access?
root access is not available for shared and reseller hosting services.
at least you must using a vps that will give you shell access as root.
non cPanel server :
once you have it and logon as root, edit your httpd.conf and find the DocumentRoot parameter.
change it to any path you like, where your website scripts taking place.
reboot the web server once it done.
cPanel server :
if you're using cPanel, than simply follow these steps below :
1. edit /var/cpanel/userdata/yourcpanelaccount/yourdomain.com
2. find end edit this part below to any different path you like :
3. rebuild the httpd.conf :
4. restart the web server daemon :
5. that would all, now your document root changed
Wollay! You got your answer....
M Noman Ajmal
skatebored gave a very good answer.
M Noman Ajmal
Thank you @skaterbored
Nice description @skatebored
glad to help y'all...
Sign in or register to add a comment.
Add a Comment
Welcome to the Hello Internet Forum!
How do I change website hosting to another provider (not google apps and not godaddy)yet keep google
Change Of Hosting To Another Domain
My registrant details on WHOIS are wrong! Please how do I change them?
Can I buy a domain from one company and use it at another web host?
Terms of Service
Useful Hints and Tips
Created with PlushForums
© 2021 Hello Internet Forum