命令:
wget http://kb.plesk.com/Attachments/kcs-12467/transvhosts.pl
perl transvhosts.pl --source-dir /var/www/vhosts --dest-dir /data/vhosts --correct-scripts
场景:
[root@localhost ~]# perl transvhosts.pl --source-dir /var/www/vhosts --dest-dir /data --correct-scripts
Moving files to new directory...
Correct psa configuration file...
Correct passwd file...
Correct server configuration files...
Clean up symlinks...
/etc/httpd/conf/plesk.conf.d/vhosts
Correct php-fpm pools configuration...
Restart php-fpm service...
Moving files to new directory...
Correct psa configuration file...
Correct passwd file...
Correct server configuration files...
Clean up symlinks...
/etc/httpd/conf/plesk.conf.d/vhosts
Correct database...
Update hosting settings...
done
Update subdomains settings...
done
Update system users settings...
done
The service node 'local' was successfully updated.
Correct user scripts...
[root@localhost ~]# service psa restart
[root@localhost ~]#
参考资料:
[1]How to change Virtual Hosts location in Plesk for Unix
[2]Plesk move your apache vhost directory