Tuesday, August 30, 2011

creating new Virtual Host using WSADMIN command

Creating new virtual hosts using a template

Some configuration object types have templates that you can use when you create a virtual host.

  • Create a new virtual host template virtualhostname.xml in the following directory:
    \config\templetes\custom\
    • Copy and paste the following file into the new virtual host template:
      \config\templetes\default\virtualhosts.xml
    • Edit and customize the new virtualhostname.xml file.
    • Rename the virtualhostname.xml file to the following:
      "- 
  • Use the reset command to recognize new templates, for example:
    $AdminConfig reset
  • Use the AdminConfig object listTemplates command to list available templates, for example:
    $AdminConfig listTemplates VirtualHost
    Example output:
    default_host(templates/default:virtualhosts.xml#VirtualHost_1) my_host(templates/default:virtualhosts.xml#VirtualHost_1)

    Note: To list the new templates, restart DeploymentManager or use the AdminConfig object reset command.

  • Create a new virtual host using the custom template, for example:
    set cell [$AdminConfig getid /Cell:NetworkDeploymentCell] set vtempl [$AdminConfig listTemplates VirtualHost my_host] $AdminConfig createUsingTemplate VirtualHost $cell {{name newVirHost}} $vtempl
  • Save the changes with the following command:
    $AdminConfig save

    Note: The administrative console does not support the use of custom templates. The new template that you create will not be visible in the administrative console panels.


1 comment:

  1. I get it clear about this process and surely i will try according to this tutorial.web hosting provider

    ReplyDelete