How to change virtual hosts' location in Plesk for Linux

Created:

2016-11-16 12:44:49 UTC

Modified:

2017-08-19 01:39:34 UTC

5

Was this article helpful?


Have more questions?

Submit a request

How to change virtual hosts' location in Plesk for Linux

Applicable to:

  • Plesk for Linux

Question

How to change virtual hosts' locations in Plesk for Linux?

Answer

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:

  1. download utility:

    # wget https://support.plesk.com/hc/article_attachments/115004384009/transvhosts.pl
  2. make it executable:

    # chmod +x transvhosts.pl
  3. 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.

Attachments:

Have more questions? Submit a request
Please sign in to leave a comment.