13.2.11. Configure the JBoss Enterprise Application Platform to Accept Requests From an External HTTPD
The JBoss Enterprise Application Platform does not need to know which proxy it is accepting requests from, only the port and protocol to look for. This is not true of mod_cluster
, which is more tightly coupled to the configuration of the JBoss Enterprise Application Platform. But the following task works for mod_jk
, mod_proxy
, ISAPI
, and NSAPI
. Substitute the protocols and ports you need to configure with the ones in the examples.
mod_cluster
, refer to Section 13.3.5, “Configure a mod_cluster Worker Node”.
Prerequisites
- You need to be logged into the Management CLI or Management Console to perform this task. The exact steps in the task use the Management CLI, but the same basic procedure is used in the Management Console.
- You need a list of which protocols you will be using, whether HTTP, HTTPS, or AJP.
Procedure 13.5. Task
Configure the
jvmRoute
anduseJK
system properties.Use the following two commands to configure thejvmRoute
anduseJK
system properties, which are necessary for HTTP connectors to work properly. Replace JVM_ROUTE with your own node name.[user@localhost:9999 /]
/system-property=jvmRoute/:add(value=JVM_ROUTE,boot-time=true)
[user@localhost:9999 /]
/system-property=UseJK/:add(value=true,boot-time=true)
List the connectors available in the web subsystem.
Note
This step is only necessary if you are not using thestandalone.ha.xml
configuration for a standalone server, or theha
orfull-ha
profiles for a server group in a managed domain. Those configurations already include all of the necessary connectors.In order for an external HTTPD to be able to connect to the JBoss Enterprise Application Platform's web server, the web subsystem needs a connector. Each protocol needs its own connector, which is tied to a socket group.To list the connectors currently available, issue the following command:[standalone@localhost:9999 /]
/subsystem=web:read-children-names(child-type=connector)
If there is no line indicating the connector your need (HTTP, HTTPS, AJP), you need to add the connector.Read the configuration of a connector.
To see the details of how a connector is configured, you can read its configuration. The following command reads the configuration of the AJP connector. The other connectors have similar configuration output.[standalone@localhost:9999 /]
/subsystem=web/connector=ajp:read-resource(recursive=true)
{ "outcome" => "success", "result" => { "enable-lookups" => false, "enabled" => true, "max-post-size" => 2097152, "max-save-post-size" => 4096, "protocol" => "AJP/1.3", "redirect-port" => 8443, "scheme" => "http", "secure" => false, "socket-binding" => "ajp", "ssl" => undefined, "virtual-server" => undefined } }Add the necessary connectors to the web subsystem.
To add a connector to the web subsystem, it needs to have a socket binding. The socket binding is added to the socket binding group used by your server or server group. The following steps assume that your server group isserver-group-one
and that your socket binding group isstandard-sockets
.Add a socket to the socket binding group.
To add a socket to the socket binding group, issue the following command, replacing the protocol and port with the ones you need.[standalone@localhost:9999 /]
/socket-binding-group=standard-sockets/socket-binding=ajp:add(port=8009)
Add the socket binding to the web subsystem.
Issue the following command to add a connector to the web subsystem, substituting the socket binding name and protocol with the ones you need.[standalone@localhost:9999 /]
/subsystem=web/connector=ajp:add(socket-binding=ajp, protocol="AJP/1.3", enabled=true, scheme="http")