Previous     Contents     Index          Next     
iPlanet Web Server, Enterprise Edition Administrator's Guide



Appendix A   Command Line Utilities


This appendix provides instructions for using command line utilities in place of the user interface screens.

This appendix contains the following sections:



Formatting LDIF Entries

LDIF consists of one or more directory entries separated by a blank line. Each LDIF entry consists of an optional entry ID, a required distinguished name, one or more object classes, and multiple attribute definitions.

For information about formatting LDIF entries, see the iPlanet Directory Server 5.0 Command and File Reference or the Netscape Schema Reference, Directory Server 4.0 on http://docs.iplanet.com/docs/manuals/directory.html.


Modifying Database Entries Using ldapmodify

You use the ldapmodify command-line utility to modify entries in an existing Directory Server database. ldapmodify opens a connection to the specified server using the distinguished name and password you supply, and modifies the entries based on LDIF update statements contained in a specified file. Because ldapmodify uses LDIF update statements, ldapmodify can do everything that ldapdelete can do.

For more information about command-line utilities used with Directory Server database entries, see the iPlanet Directory Server 5.0 Command and File Reference or the Netscape Schema Reference, Directory Server 4.0 on http://docs.iplanet.com/docs/manuals/directory.html.



HttpServerAdmin (Virtual Server Administration)



HttpServerAdmin is a command line utility that performs the same administrative functions as the virtual server user interface in the Server Manager and the Class Manager. If you prefer to set up your virtual servers using the command line interface, use HttpServerAdmin.

HttpServerAdmin is in server_root/bin/https/httpadmin/bin.

Before you can run HttpServerAdmin, you need to set the environment variable IWS_SERVER_HOME to the server root directory in your environment.

For example, on Unix/Linux systems:

setenv IWS_SERVER_HOME /usr/iplanet/servers

On Windows NT systems:

  1. On the Control Panel, choose System.

  2. Click the Environment tab.

  3. Type IWS_SERVER_HOME in the Variable field and the path to your server root in the Value field.

  4. Click Set.

  5. Click OK.



    Note In order to perform all commands, you need to have write permissions to the file server.xml where the virtual server information is stored.




HttpServerAdmin Syntax

The HttpServerAdmin syntax is as follows:

HttpServerAdmin command_name command_options -d server_root -sinst http_instance

You can get an online explanation of the command parameters by typing the following command:

./HttpServerAdmin -h

There are four possible values for the command_name parameter:

  • control

  • create

  • delete

  • list

Each command has its own set of command options. For more information, see the sections in this chapter that describe each command.

Regardless of the value of the command parameter, the parameters shown in Table A-1 can apply to all uses of the HttpServerAdmin command.


Table A-1    HttpServerAdmin Parameters

Parameter

Value

-d server_root  

(required). This parameter designates the path to the server root (the location where the server is installed).  

-sinst http_instance  

(required). This parameter designates which instance HttpServerAdmin affects.  


control Command

Use the control command to start, stop, and disable classes and virtual servers. If you do not specify a virtual server, the command starts, stops or disables every virtual server in the class.


Options

Use the options shown in Table A-2 with the control command to control classes and virtual servers.


Table A-2    Control command options

Options

Value

-start  

Starts the specified virtual server, or all virtual servers in the class if no virtual server is specified.  

-stop  

Stops the specified virtual server, or all virtual servers in the class if no virtual server is specified.  

-disable  

Disables the specified virtual server, or all virtual servers in the class if no virtual server is specified.  


Syntax

HttpServerAdmin control -cl classname, -control_option [-id virtual_server] -d server_root -sinst http_instance


Parameters

Use these parameters with the command options to control virtual servers


Table A-3    Control command parameters

Parameters

Value

-cl classname  

Designates the virtual server class  

-id virtual_server  

(optional) Designates the virtual server ID you are controlling.  


Examples


HttpServerAdmin control -cl myclass -start -id myvirtualserver -d /usr/iplanet/servers -sinst https-iplanet.com

HttpServerAdmin control -cl myclass -stop -id myvirtualserver -d /usr/iplanet/servers -sinst https-iplanet.com

HttpServerAdmin control -cl myclass -disable -id myvirtualserver -d /usr/iplanet/servers -sinst https-iplanet.com


create Command

Use the create command to create classes of virtual servers, virtual servers, listen sockets and connection groups.


Options

Use the options shown in Table A-4 with the create command to create classes, listen sockets, and virtual servers.


Table A-4    Create command options

Option

Value

-c  

Creates a virtual server class.  

-g  

Creates a connection group.  

-l  

Creates a listen socket.  

-v  

Creates a virtual server.  

Each of these options in turn has its own parameters, which are shown in the following sections.


Create Virtual Server Class

Use this option of the create command to create a virtual server class.


Syntax
HttpServerAdmin create -c -cl classname [-docroot document_root] [-obj obj.conf_file] [-acptlang accept_language] -d server_root -sinst http_instance


Parameters
Use the parameters shown in Table A-5 with the create -c command option to create classes.


Table A-5    Create virtual server class parameter

Parameter

Value

-cl classname  

The name of the class you want to create.  

-docroot document_root  

(optional) The document root for the class. This has to be an absolute path.  

-obj obj.conf_file  

(optional) The obj.conf file for the class. If you do not specify this parameter, the server creates the obj.conf file as classname.obj.conf. If you want a different name for the class' obj.conf file, specify it here.  

-acptlang accept_language  

(optional) If you do not specify this parameter, acptlang will be off by default.  


Example


HttpServerAdmin create -c -cl myclass1 -d /export/iplanet/servers -sinst https-iplanet.com


Create Connection Group

Use this option of the create command to create a connection group.


Syntax
HttpServerAdmin create -g group_ID -lsid listen_socket -ip IPaddress -sname server_name -defaultvs default_virtual_server -d server_root -sinst http_instance


Parameters
Use the parameters shown in Table A-8 with the create -g command option to create connection groups.


Table A-6    Create connection group parameters

Parameter

Value

-g connection_group  

The ID of the connection group you are creating.  

-lsid listen_socket  

The ID of the listen socket you want associated with this connection group.  

-ip IP_address  

The IP address associated with this connection group.  

-sname server_name  

The server name.  

-defaultvs default_virtual_server  

The default virtual server the connection group connects to if the requested URL host cannot be found.  


Examples


HttpServerAdmin create -g conngroup2 -lsid ls1 -ip 1.1.1.1 -sname iplanet -defaultvs vs2 -d server_root -sinst https-iplanet.com


Create Listen Socket

Use this option of the create command to create a listen socket.


Syntax
HttpServerAdmin create -l -ip ip_address -port port_number -sname server_name -defaultvs default_virtual_server [-sec security] [-acct number_of_accept_threads] -d server_root -sinst http_instance


Parameters
Use the parameters shown in Table A-7 with the create -l command option to create listen sockets.


Table A-7    Create listen socket parameters

Parameter

Value

-ip ip_address  

The IP address for the listen socket.  

-port port_number  

The port number for the listen socket.  

-sname server_name  

The server name to associate with the listen socket.  

-defaultvs default_virtual_server  

The ID of the default virtual server. This virtual server must exist before you can use it to create a listen socket.  

-acct number_of_accept_threads  

(optional) The number of accept threads for the listen socket.  

-sec on  

(optional) If specified, use on to enable security for the listen socket. If not specified, security is not enabled.  


Example


HttpServerAdmin create -l -id ls3 -ip 0.0.0.0 -port 1333 -sname austen -defaultvs vs2 -sec on -acct 4 -d /export/carey/server6 -sinst https-austen.com


Create Virtual Server

Use this option of the create command to create a virtual server.

Please note that if you do not include values for some of the optional parameters, defaults are provided. You can always change the default values after the virtual server is created.


Syntax
HttpServerAdmin create -v -id virtual_server -cl classname -urlh urlhosts -conngroupid connection_group_ID[-state state][-docroot document_root] [-mime mime_types_file] [-aclid acl_ID] -d server_root -sinst http_instance


Parameters
Use the parameters shown in Table A-8 with the create -v command option to create virtual servers.


Table A-8    Create listen socket parameters

Parameter

Value

-id virtual_server  

The ID of the virtual server you are creating.  

-cl classname  

The class of which the virtual server will be a member.  

-urlh URL_hosts  

The URL hosts for the virtual server. You can specify more than one URL host, separated by a comma.  

-conngroupid connection_group_ID  

The connection group for the listen socket.  

-state state  

(optional) Valid values are on, off, and disable.  

-docroot document_root  

(optional) If you want to specify a document root for a virtual server, use this parameter. You must use an absolute path name.  

-mime mime_types_file  

(optional) The name of the MIME types file for the virtual server.  

-aclid acl_ID  

(optional) The ACL file ID <ACLID> used in the server.xml file  


Examples


HttpServerAdmin create -v -id vs3 -cl class1 -urlh annh -conngroupid group1 -d /export/iplanet/server6 -sinst https-iplanet.com

HttpServerAdmin create -v -id vs4 -cl class1 -urlh annh,annh2 -conngroupid group1 -state off -mime mime.types -d /export/iplanet/server6 -sinst https-iplanet.com


delete Command

Use the delete command to delete classes of virtual servers, virtual servers, and listen sockets.


Options

Use the options shown in Table A-9 with the delete command to delete classes.


Table A-9    Delete command options

Option

Value

-c  

Deletes the specified virtual server class.  

-g  

Deletes the specified connection group.  

-l  

Deletes the specified listen socket IDs  

-v  

Deletes the specified virtual servers.  


Delete Class

Use this option of the delete command to delete a virtual server class.


Syntax
HttpServerAdmin delete -c -cl classname -d server_root -sinst http_instance


Parameters
Use the parameters shown in Table A-9 with the delete command to delete classes.


Table A-10    Delete class parameters

parameter

Value

-c l class  

The class name you want to delete.  


Example


HttpServerAdmin delete -c -cl class1 -d /export/iplanet/server6 -sinst https-iplanet.com


Delete Connection Group

Use this option of the delete command to delete a connection group.


Syntax
HttpServerAdmin delete -g -id connection_group -lsid listen_socket -d server_root -sinst http_instance


Parameters
Use the parameters shown in Table A-9 with the delete command to delete a connection group.


Table A-11    Delete connection group parameters

parameter

Value

-id connection_group  

The virtual server ID you want to delete  

-lsid listen_socket  

The listen socket ID the connection group belongs to.  


Example


HttpServerAdmin delete -g -id conngroup3 -lsid ls2 -d /export/iplanet/server6 -sinst https-iplanet.com


Delete Listen Socket

Use this option of the delete command to delete a listen socket.


Syntax
HttpServerAdmin delete -l -id listen_socket -d server_root -sinst http_instance


Parameters
Use the parameters shown in Table A-9 with the delete command to delete classes.


Table A-12    Delete class parameters

parameter

Value

-id listen_socket  

The ID of the listen socket you want to delete.  


Example


HttpServerAdmin delete -l -id ls3 -d /export/iplanet/server6 -sinst https-iplanet.com


Delete Virtual Server

Use this option of the delete command to delete a virtual server.


Syntax
HttpServerAdmin delete -v -id virtual_server -cl classname -d server_root -sinst http_instance


Parameters
Use the parameters shown in Table A-9 with the delete command to delete a virtual server.


Table A-13    Delete virtual server parameters

parameter

Value

-id virtual_server  

The virtual server ID you want to delete  

-cl class  

The class the virtual server belongs to.  


Example


HttpServerAdmin delete -v -id vs3 -cl class1 -d /export/iplanet/server6 -sinst https-iplanet.com


list Command

Use the list command to list classes of virtual servers, virtual servers, listen sockets and connection groups.


Syntax

HttpServerAdmin list -command_option -d server_root -sinst http_instance


Options


Table A-14    List command options

Option

Value

-c  

Lists all virtual server classes.  

-g -lsid listen_socket  

Lists all connection groups for a listen socket.  

-l  

Lists all listen sockets.  

-v  

Lists all virtual servers.  


Example


HttpServerAdmin list -c -d /export/iplanet/server6 -sinst https-iplanet.com

HttpServerAdmin list -l -d /export/iplanet/server6 -sinst https-iplanet.com

HttpServerAdmin list -g -lsid ls1 -d /export/iplanet/server6 -sinst https-iplanet.com

The list of information appears in your command window.


Previous     Contents     Index          Next     
Copyright © 2001 Sun Microsystems, Inc. Some preexisting portions Copyright © 2001 Netscape Communications Corp. All rights reserved.

Last Updated May 09, 2002