Plesk

 How to change the default content for newly created domains in Plesk?

Question

How to change the default content for newly created domains in Plesk?

Answer

Note: The solution is applicable by Plesk Administrators and Plesk resellers.

Click on a section to expand

Changing the default page via Plesk

  1. Download zip file, according to the installed version, which contains files of default website:

  2. Modify the files inside this zip file according to your needs (website files are located inside the /httpdocs directory).

  3. Once done, go to Plesk > Tools & Settings > Virtual Host Template:

  4. Click Browse... (or Choose File) > Select the modified zip file > Click Send File:

Changing the default page via SSH & RDP

  • Modify the Default Virtual Host Templates:

    1. Connect to the Plesk server via SSH/RDP

    2. Modify the default template content inside the following directory:

      • On Linux: /var/www/vhosts/.skel/0/httpdocs/

      • On Windows Server (just paste this path in Windows Explorer to open): %plesk_vhosts%.skelhttpdocs

  • Create or modify the Virtual Host Template for a Reseller:

    1. Connect to the Plesk server via SSH/RDP

    2. In Windows, start a command prompt as an Administrator

    3. Extract the Reseller ID with the following command:

      # plesk db "select id, cname, pname from clients where type='reseller'"

    4. Copy the default template folder with ID 0 with the Reseller ID. For example, if the Reseller ID is 2:

      • On Linux: Copy /var/www/vhosts/.skel/0 folder to /var/www/vhosts/.skel/2

      • On Windows Server: Copy %plesk_vhosts%.skel folder to %plesk_vhosts%.skel2

    5. Modify the Reseller template content inside the Reseller template directories. According to the example shown in step 4:

      • On Linux: /var/www/vhosts/.skel/2/httpdocs/

      • On Windows Server (just paste this path in Windows Explorer to open): %plesk_vhosts%.skel2httpdocs

Additional Information

Exit mobile version