SymptomsI want to publish site with VPS publishing mode. How to configure publishing settings correctly?
ResolutionYou may configure using instructions below.
1. On Parallels Plesk Sitebuilder server generate public SSH key under Apache user:
sitebuilder~# sudo -u apache ssh-keygen -t rsa1
Generating public/private rsa1 key pair.
Enter file in which to save the key (/var/www/.ssh/identity):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /var/www/.ssh/identity.
Your public key has been saved in /var/www/.ssh/identity.pub.
The key fingerprint is:
2. Copy the key file /var/www/.ssh/identity.pub to /home/vzagent0/.ssh/authorized_keys on service container on publishing host.
Login to Hardware Node where Publishing Container is running and enter Service Container.
Open file /home/vzagent0/.ssh/authorized_keys (with vim) and insert content of new generated file /var/www/.ssh/identity.pub.
3. Run the following command to verify Parallels Plesk Sitebuilder is able to work with Service Container:
sitebuilder~# sudo -u apache /usr/bin/ssh -oPasswordAuthentication=no -oProtocol=1 -lvzagent0 -T -oStrictHostKeyChecking=no -oConnectionAttempts=1 126.96.36.199
<packet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="0" priority="0" version="4.0.0">
4. Login to Parallels Plesk Sitebuilder and create new site. Then configure publishing settings in the following way:
Sitebuilder -> Sites -> <site name> -> Publishing Settings
Publishing mode: VPS
Host: 188.8.131.52 <- IP of Service Container
Container ID: 125 <- ID or Publishing Container
User: USER <- user which is used by Apache to work in publishing working directory
Group: GROUP <- group which is used by Apache to work in publishing working directory
Working directory: /var/www/qwerty <- full directory where the site is published to (publishing directory)
Web site URL: http://site.name/qwerty/ <- URL of published site
For example if Parallels Plesk Panel is installed on Publishing Container and Sitebuilder site is published to Plesk <domain name> then publishing settings may look like the following:
Publishing mode: VPS
Container ID: 135
User: <ftp user> <- FTP user of <domain>
Working directory: /var/www/vhosts/<domain>/httpdocs/qwerty
Web site URL: http://<domain>/qwerty/
After configuration above publishing via VPS more should be possible.
You may check the location with button Verify Location:
Sitebuilder -> Sites -> <site name> -> Publishing Settings -> Verify Location