ホスティング記述ファイルのサンプル

ホスティング記述ファイルのサンプルは、Plesk Migrator ディストリビューションの一部として提供され、以下のディレクトリに格納されています。

  • Linux の場合: /usr/local/psa/admin/plib/modules/panel-migrator/backend/conf/samples/custom/
  • Windows の場合: %plesk_dir%admin\plib\modules\panel-migrator\backend\conf\samples\custom\

Plesk Migrator ディストリビューションには、schema.json ファイルも含まれており、使用可能なすべてのホスティング記述パラメータが列挙されています。このファイルは以下のディレクトリにあります。

  • Linux の場合: /usr/local/psa/admin/plib/modules/panel-migrator/backend/lib/python/parallels/plesk/hosting_description/
  • Windows の場合: %plesk_dir%admin\plib\modules\panel-migrator\backend\lib\python\parallels\plesk\hosting_description\

以下は、2 つのシンプルなホスティング記述ファイルのサンプルです。

YAML
customers:
  -
    login: jsmith
    password: 123qwe
    contact_info:
       name: John Smith
       email: jsmith@example.com
    subscriptions:
      -
        name: example.com
        sys_user:
          login: jsmith
          password: 123qwe1
        addon_domains:
          -
            name: another.tld
          -
            name: other.tld
        subdomains:
          -
            name: s.another.tld
          -
            name: s.example.com
        databases:
          -
            type: mysql
            name: examplecomdb1
            users:
              -
                login: exdbuser1
                password: qweqwe
          -
            type: mysql
            name: examplecomdb2
            users:
              -
                login: exdbuser2
                password: eiury
        mail_service:
          mail_users:
            -
              name: john
              password: 123qwe
              disk_quota: 50M
              spamfilter: true
              antivirus: none
            -
              name: bob
              password: 123qwe
              disk_quota: 10M
            -
              name: tom
              password: 123qwe
              disk_quota: 10M
      -
        name: example.net
        source_webspace_root: /home/sergey/data/
        source_document_root: /home/sergey/data/www/example.net
        sys_user:
          login: serg
          password: 123qwe
        databases:
          -
            type: mysql
            name: db3
            users:
              -
                login: db3user
                password: qweqwe
  -
    login: asmith
    password: 123qwe
    contact_info:
      name: Alex Smith
      email: asmith@example.com
    subscriptions:
      -
        name: example.info
        source_webspace_root: /home/alexey/data/
        source_document_root: /home/alexey/data/www/example.info
        sys_user:
          login: alexey
        databases:
          -
            type: mysql
            name: db1
            users:
              -
                login: db1user
                password: qweqwe
          -
            type: mysql
            name: db2
            users:
              -
                login: db2user
        mail_service:
          mail_users:
            -
              name: alexey
              password: 123qwe
JSON
{
  "customers": [
    {
      "name": "John Smith",
      "login": "jsmith",
      "subscriptions": [
        {
          "name": "jsmith.tld",
          "sys_user": {
            "login": "johny",
            "password": "123qwe"
          }
        }
      ]
    },
    {
      "name": "Alex Smith",
      "login": "alexey",
      "subscriptions": [
        {
          "name": "alex.tld",
          "sys_user": {
            "login": "alexsmith",
            "password": "123qwe"
          }
        }
      ]
    }
  ]
}
 

Leave your feedback on this topic here

If you have questions or need support, please visit the Plesk forum or contact your hosting provider.
The comments below are for feedback on the documentation only. No timely answers or help will be provided.