Example: Migrating - Modifying the virtual host

The following examples demonstrate how to modify the virutal host in WAS V4.0 and V6.x:

  • wscp V4.0

    VirtualHost modify /VirtualHost:default_host/ -attribute {{Name default_host} {AliasList
    {*:80 *:9080 *:9081}}
    

  • wsadmin V6.x

    Jacl

    set def_host [$AdminConfig getid /VirtualHost:default_host/]
    $AdminConfig modify $def_host {{aliases {{{port 80} {hostname *}} {{port 9080} {hostname *}} {{port 9081} {hostname *}}}}}
    $AdminConfig save
    

    Jython

    def_host = AdminConfig.getid('/VirtualHost:default_host/')
    AdminConfig.modify(def_host, [['aliases', [[['port', 80], ['hostname', '*']], [['port',  9080], ['hostname', '*']], [['port', 9081], ['hostname', '*']]]]])
    AdminConfig.save()
    


 

See Also


Commands for the AdminConfig object