• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

How to change the vhosts location

ProWebS

Regular Pleskian
Hello,

I want to install Plesk 10.x in a new server in which most of the disk space is in the partition /home/
and in my experience plesk saves the vhosts at /var/www/vhosts/

How can I install plesk 10.x to use /home/www/vhosts/ or /home/vhosts/ instead of /var/ ?
 
Use /usr/local/psa/bin/transvhosts.pl utility. For more details use --help option.
 
Well I did that:

[root@home]# /usr/local/psa/bin/transvhosts.pl --dest-dir /home/www/vhosts/
Moving files to new directory...
Correct psa configuration file...
Correct passwd file...
Correct database...
Update hosting settings...
done
Update subdomains settings...
done
Update system users settings...
done
The service node 'local' was successfully updated.

and after I tried to created a test site from Plesk I got the error:

Error: hosting update is failed: Execution failed. Command: skelmng Arguments: Array ( [0] => --setup-skel [1] => --vhost-name [2] => domain.tld [3] => --id [4] => 0 [5] => --www-root [6] => /home/www/vhosts/domain.tld/httpdocs [7] => --cgi-bin-path [8] => /home/www/vhosts/domain.tld/cgi-bin ) Details: Empty error message from utility.

Any ideas?
 
As I see the problem is in the skelmng execution, so I did try to run the command manually, the ouput is:

[root@]# /usr/local/psa/admin/sbin/skelmng --setup-skel --vhost-name domain.tld --id 0 --www-root=/home/www/vhosts/domain.tld/httpdocs --cgi-bin-path=/home/www/vhosts/domain.tld/cgi-bin
Unexpected error: Directory /home/www/vhosts/domain.tld does not represent a virtual host
 
Ok I've found the problem, it was the slash at the end of the path:

[root@/]# grep HTTPD_VHOSTS_D /etc/psa/psa.conf
HTTPD_VHOSTS_D /home/www/vhosts/

I did change it to :
[root@/]# grep HTTPD_VHOSTS_D /etc/psa/psa.conf
HTTPD_VHOSTS_D /home/www/vhosts

and now everything works great.
 
I hate trailing slashes :) Sometimes you need them, sometimes you don't, and it can be impossible to tell unless the script or app tells you one way or the other.

For people visiting this topic in the future:

Thanks to ProWebS, when using transvhosts.pl we know you need to exclude the trailing slash.

For example, to change from the default location of /var/www/vhosts to the old-style /home/httpd/vhosts location, you'd need to use the following syntax:


CORRECT:
Code:
/usr/local/psa/bin/transvhosts.pl --dest-dir /home/httpd/vhosts

INCORRECT:
Code:
/usr/local/psa/bin/transvhosts.pl --dest-dir /home/httpd/vhosts/
 
Last edited:
Back
Top