- Plesk for Linux
How to change a default document root for websites?
Note: The default document root will be changed only for newly created domains. All existing domains will keep storing their files in the old location.
Connect to the Plesk server via SSH.
If the configuration file /usr/local/psa/admin/conf/panel.ini does not yet exist, copy it from the sample:
# cp /usr/local/psa/admin/conf/panel.ini.sample /usr/local/psa/admin/conf/panel.ini
Open the file /usr/local/psa/admin/conf/panel.ini in any text editor and specify the default document root by adding the following records at the end of the file:
docroot = "new_default_docroot"
where new_default_docroot - a directory name or a path to the directory (e.g. "public" or "domain/public"), which will be located inside the domain directory (e.g. /var/www/vhosts/example.com/domain/public/).
Save the changes and close the file. Now all new domains will be created with the specified document root.
For more information about defining a custom document root, visit: Administrator's Guide: Defining a Custom Document Root.