Skip to main content

Globally change public_html?

Comments

10 comments

  • Jcats
    So this translator isn't good but if I understand correctly: sed -e '/^documentroot:.*public_html$/{s/public_html/public/g'} /var/cpanel/userdata/*/*
    Definitely test it out, once you are ready to make the actual change you can add -i: cp -rf /var/cpanel/userdata /var/cpanel/userdatabk sed -ie '/^documentroot:.*public_html$/{s/public_html/public/g'} /var/cpanel/userdata/*/* /scripts/rebuildhttpdconf /scripts/restartsrv_apache
    This will only change the doc root if it ends in public_html so it will not affect subdomains or addon domains, unless they are pointed to public_html.
    0
  • tvakrep
    my domain name example.com hosting www.example.com
    open no /public_html i want www.example.com
    open /public root file How to change root directory no /public_html yes /public
    0
  • Jcats
    edit the files: /var/cpanel/userdata/cpusername/domain.com /var/cpanel/userdata/cpusername/domain.com_SSL change the path for 'documentroot' then run: /scripts/rebuildhttpdconf /scripts/restartsrv_apache
    0
  • tvakrep
    h?m thank you
    0
  • tvakrep
    where will i run ssh? then run: Code: /scripts/rebuildhttpdconf /scripts/restartsrv_apache
    0
  • Jcats
    Yes all this is done via SSH
    0
  • tvakrep
    thank you... Very very very thank you :D
    0
  • tvakrep
    sory ubuntu cpanel install ?
    0
  • Jcats
    Negative:
    0
  • cPanelLauren
    Thank @Jcats @tvakrep let us know if you have any further questions or concerns!
    0

Please sign in to leave a comment.