- Plesk for Linux
How to change virtual hosts' locations in Plesk for Linux?
Warning: Plesk Onyx with SELinux enabled does not support custom vhost directory, that would break your sites. This bug # PPPM-6521 would be fixed in future Plesk updates.
In Plesk for Linux, transvhosts.pl utility can be used to change the location for all virtual hosts:
# wget https://support.plesk.com/hc/article_attachments/115004384009/transvhosts.pl
make it executable:
# chmod +x transvhosts.pl
run the utility with the "
--help" key to see the available options.
# perl transvhosts.pl --help
In the following example, the location is changed to /home directory:
# perl transvhosts.pl --dest-dir /home --correct-scripts
Note: If SELinux is enabled, make sure to change the SELinux context on the new destination. See article #213942785 for more details.