天天看點

plesk vhosts目錄遷移

指令:

wget http://kb.plesk.com/Attachments/kcs-12467/transvhosts.pl
perl transvhosts.pl --source-dir  /var/www/vhosts  --dest-dir  /data/vhosts  --correct-scripts
           

場景:

[[email protected] ~]# 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...
[[email protected] ~]# service psa restart
[[email protected] ~]# 
           

參考資料:

[1]How to change Virtual Hosts location in Plesk for Unix

[2]Plesk move your apache vhost directory