Search Engine: Elastic

Article ID: 121189, created on Apr 19, 2014, last review on Jul 14, 2018

  • Applies to:
  • Plesk Automation 11.5


How can I change default websites location for the Apache service node in Parallels Plesk Automation?


On the Apache service node:

  1. Create new directory for vhosts location, example "/var/www/sites":

    # mkdir /var/www/sites
  2. Copy content of old vhost folder to a new directory, because it requires some system folders like .skel, default:

    # cp -Rp /var/www/vhosts/* /var/www/sites/
  3. Change the HTTPD_VHOSTS_D value in the/etc/psa/psa.conf to the desired default location:

        # grep HTTPD_VHOSTS_D  /etc/psa/psa.conf             
        HTTPD_VHOSTS_D /var/www/sites

On the Management Node:

  1. Change corresponding value in the psa database on the Management Node:

    a. Find Apache node ID using its IP address:
    mysql> select id,ipAddress from ServiceNodes where ipAddress='';
    | id | ipAddress   |
    |  3 |    |
    b. Find Apache node parameters:
    mysql> select * from ServiceNodeEnvironment where serviceNodeId=3 and  name='HTTPD_VHOSTS_D';
    | serviceNodeId | section       | name           | value           |
    |             3 | configuration | HTTPD_VHOSTS_D | /var/www/vhosts |
    c. Change value to the desired location:
    mysql> update ServiceNodeEnvironment set value='/var/www/sites' where serviceNodeId=3 and name='HTTPD_VHOSTS_D';
  2. Reconfigure all settings/templates for new vhosts location:

    # /usr/local/psa/admin/sbin/httpdmng --reconfigure-all -service-node

Additional information

Please refer to #118735 article if you to get the instruction how to change default websites location for the IIS service node in Parallels Plesk Automation.

33a70544d00d562bbc5b17762c4ed2b3 e0aff7830fa22f92062ee4db78133079 caea8340e2d186a540518d08602aa065

Email subscription for changes to this article
Save as PDF