- Plesk for Linux
How to change virtual hosts locations in Plesk for Linux?
Warning: Plesk Onyx with SELinux enabled does not support custom vhosts directory, that would break your sites. This bug PPPM-6521 will be fixed in future Plesk updates.
In Plesk for Linux, transvhosts.pl utility can be used to change the location for all virtual hosts:
# /usr/local/psa/bin/transvhosts.pl --help
In the following example, the location is changed to /home directory:
# /usr/local/psa/bin/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 Webserver reconfiguration fails with permission denied when SELinux is in enforced mode for more details. If there is no transvhosts.pl utility, download it from the attachment.