• Saurabh Vij
    2
    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?
  • skatebored
    2
    halu...

    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 :
    documentroot: /home/yourcpanelaccount/public_html
    3. rebuild the httpd.conf :
    /scripts/rebuildhttpdconf
    4. restart the web server daemon :
    /scripts/restartsrv_httpd
    5. that would all, now your document root changed

    enjoi...
  • Rabia Riaz
    20
    Wollay! You got your answer....
  • M Noman Ajmal
    19
    Hello Suarabh
    skatebored gave a very good answer.
  • Saurabh Vij
    2
    Thank you @skaterbored
  • Sanzida Aktrr
    5
    Nice description @skatebored
  • skatebored
    2
    sup guys...

    glad to help y'all...
bold
italic
underline
strike
code
quote
ulist
image
url
mention
reveal
youtube
tweet
Add a Comment

Welcome to the Hello Internet Forum!

Hello Internet Forum - Know an answer? Answer by signing up ;)