Globally change public_html?
K"k dizini nas?l de?i?tiririm .. example.com
alt etki alan? de?il
domain example.com K"k dizini nas?l de?i?tiririm .. publich_html genel de?i?tir
domain example.com How to change root directory .. /publich_html change /public
no subdomain xxx.example.xom
-
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 -
my domain name example.com hosting www.example.com
open no /public_html i wantwww.example.com
open /public root file How to change root directory no /public_html yes /public0 -
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_apache0 -
h?m thank you 0 -
where will i run ssh? then run: Code: /scripts/rebuildhttpdconf /scripts/restartsrv_apache 0 -
Yes all this is done via SSH 0 -
thank you... Very very very thank you :D 0 -
sory ubuntu cpanel install ? 0 -
Thank @Jcats @tvakrep let us know if you have any further questions or concerns! 0
Please sign in to leave a comment.
Comments
10 comments