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.

To configure the JBoss Enterprise Application Platform for mod_cluster, refer to Section 13.3.5, “Configure a mod_cluster Worker Node”.


Procedure 13.5. Task

  1. Configure the jvmRoute and useJK system properties.

    Use the following two commands to configure the jvmRoute and useJK 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)
  2. List the connectors available in the web subsystem.


    This step is only necessary if you are not using the standalone.ha.xml configuration for a standalone server, or the ha or full-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.
  3. 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
  4. 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 is server-group-one and that your socket binding group is standard-sockets.
    1. 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)
    2. 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")