スクリプトを使用して、新規のあるいは既存のテンプレートから、新規の仮想ホストを作成します。
一部の構成オブジェクト・タイプは、仮想ホストの作成に使用できるテンプレートを持っています。 既存のテンプレートを使用して、または新規カスタム・テンプレートを 作成することによって、新規に仮想ホストを作成できます。 以下のステップを実行し、テンプレートを使用して新規仮想ホストを作成します。
app_server_root/config/templates/default/virtualhosts.xml
app_server_root/config/templates/custom/
新規カスタム・テンプレートをテンプレート・リストに表示させるには、デプロイメント・マネージャーを再始動します。
管理コンソールは、 カスタム・テンプレートの使用はサポートしていません。 作成される新規テンプレートは、 管理コンソールのパネルには表示されません。
Jacl を使用:
$AdminConfig listTemplates VirtualHost
print AdminConfig.listTemplates('VirtualHost')
default_host(templates/default:virtualhosts.xml#VirtualHost_1) my_host(templates/custom:virtualhostname.xml#VirtualHost_1)
set cell [$AdminConfig getid /Cell:NetworkDeploymentCell/] set vtempl [$AdminConfig listTemplates VirtualHost my_host] $AdminConfig createUsingTemplate VirtualHost $cell {{name newVirHost}} $vtempl
cell = AdminConfig.getid('/Cell:NetworkDeploymentCell/') vtempl = AdminConfig.listTemplates('VirtualHost', 'my_host') AdminConfig.createUsingTemplate('VirtualHost', cell, [['name', 'newVirHost']], vtempl)