• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Question rename virtual host directory

gmk77

New Pleskian
Server operating system version
linux
Plesk version and microupdate number
18.0.52
Hi,

I would like to know if there is a way to change the name of the virtual host directory of a domain. For example when I create the domain "mydomain.com" in plesk the corresponding directory is created in /var/www/vhosts/mydomain.com, I would like to change the name /var/www/vhosts/mycustomname....is this possible?

thank you
 
@Kaspar - as usual - is perfectly right. But I'd like to add that this directory is of minor importance. Many providers create a generic, non-working domain name as a kind of "root" domain for users, like "customer345678.xx" and then add the "real" domain(s) later with "Add domain" to avoid the issue from start. In general however, no web server content will be placed into that directory directly, but will always go into a document root directory located under the main subscription directory.

The document root directory can be set when "Add Domain" is used (or "Add Subdomain"):

1686057796360.png

When you type in a domain name, the document root field is populated with the same name, but this is only a suggestion. It can be overwritten by the subscriber, and Plesk will create a custom directory, too, if the subscriber enters a different string.

It is also possible to change an existing documen root path. For that File Manager can be used to rename the directory, and the document root directory can be renamed in "Hosting Settings" of the domain configuration to the renamed directory.

If I am wrong, please let me know, maybe I just didn't get the question right.
 
Back
Top