create-http-listener
Adds a new HTTP network listener socket.
Synopsis
asadmin [asadmin-options] create-http-listener [--help]
--listeneraddress address
--listenerport listener-port
{--default-virtual-server | --defaultvs} virtual-server
[--servername server-name]
[--acceptorthreads acceptor-threads]
[--xpowered={true|false}]
[--redirectport redirect-port]
[--securityenabled={false|true}]
[--enabled={true|false}]
[--target target]
listener-id
Description
The create-http-listener
subcommand creates an HTTP network listener. This subcommand is supported in remote mode only.
If you edit the special HTTP network listener named admin-listener , you must restart the server for the changes to take effect. The Administration Console does not tell you that a restart is required in this case.
|
This subcommand is provided for backward compatibility and as a shortcut for creating network listeners that use the HTTP protocol. Behind the scenes, this subcommand creates a network listener and its associated protocol, transport, and HTTP configuration. |
Options
- asadmin-options
-
Options for the
asadmin
utility. For information about these options, see theasadmin
help page. --help
-?
-
Displays the help text for the subcommand.
--listeneraddress
-
The IP address or the hostname (resolvable by DNS).
--listenerport
-
The port number to create the listen socket on. Legal values are 1-65535. On UNIX, creating sockets that listen on ports 1-1024 requires superuser privileges. Configuring an SSL listen socket to listen on port 443 is recommended.
--default-virtual-server
--defaultvs
-
The ID attribute of the default virtual server for this listener. The
--defaultvs
option is deprecated. --servername
-
Tells the server what to put in the host name section of any URLs it sends to the client. This affects URLs the server automatically generates; it doesn’t affect the URLs for directories and files stored in the server. This name should be the alias name if your server uses an alias. If a colon and port number are appended, that port will be used in URLs that the server sends to the client.
--acceptorthreads
-
The number of acceptor threads for the listener socket. The recommended value is the number of processors in the machine. The default value is 1.
--xpowered
-
If set to
true
, adds theX-Powered-By: Servlet/3.0
andX-Powered-By: JSP/2.0
headers to the appropriate responses. The Servlet 3.0 specification defines theX-Powered-By: Servlet/3.0
header, which containers may add to servlet-generated responses. Similarly, the JSP 2.0 specification defines theX-Powered-By: JSP/2.0
header, which containers may add to responses that use JSP technology. The goal of these headers is to aid in gathering statistical data about the use of Servlet and JSP technology. The default value istrue
. --redirectport
-
Do not specify this option. This option is retained for compatibility with earlier releases. If you specify this option, a syntax error does not occur. Instead, the subcommand runs successfully and displays a warning message that the option is ignored.
--securityenabled
-
If set to true, the HTTP listener runs SSL. You can turn SSL2 or SSL3 ON or OFF and set ciphers using an SSL element. The security setting globally enables or disables SSL by making certificates available to the server instance. The default value is
false
. --enabled
-
If set to true, the listener is enabled at runtime. The default value is
true
. --target
-
Creates the HTTP listener only on the specified target. Valid values are as follows:
server
-
Creates the HTTP listener on the default server instance. This is the default value.
- configuration-name
-
Creates the HTTP listener in the specified configuration.
- cluster-name
-
Creates the HTTP listener on all server instances in the specified cluster.
- standalone-instance-name
-
Creates the HTTP listener on the specified standalone server instance.
Examples
Example 1 Creating an HTTP Network Listener
The following command creates an HTTP network listener named sampleListener
that uses a non-default number of acceptor threads and is not enabled at runtime:
asadmin> create-http-listener --listeneraddress 0.0.0.0 --listenerport 7272
--defaultvs server --servername host1.sun.com --acceptorthreads 100
--securityenabled=false --enabled=false sampleListener
Command create-http-listener executed successfully.