此内容没有您所选择的语言版本。
3.2. Configuring JBoss Enterprise Application Platform to Work with mod_jk
3.2.1. Configuring the Web Subsystem 复制链接链接已复制到粘贴板!
- The Basic Configuration
- Connector Configuration
- Virtual Server Configuration
3.2.1.1. Basic Configuration 复制链接链接已复制到粘贴板!
Procedure 3.3. Basic Configuration for a Web Subsystem
Configure the Required Extension
Add an entry to the configuration file to add the required extension, as follows:<extension module="org.jboss.as.web" />
<extension module="org.jboss.as.web" />
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Configure the Subsystem
Configure the basic information for your subsystem. The following is a sample subsystem configuration:Copy to Clipboard Copied! Toggle word wrap Toggle overflow
3.2.1.2. Configuring Connectors 复制链接链接已复制到粘贴板!
- HTTP Connectors.
- HTTPS Connectors.
- AJP Connectors.
- Native Connectors.
connector
attributes, refer to the connectors page.
3.2.1.2.1. Configuring HTTP Connectors 复制链接链接已复制到粘贴板!
8080
.
Procedure 3.4. Configure HTTP Connectors
Create a New Socket Binding
Use the following configuration to create a new socket binding to use when creating a HTTP connector:[standalone@localhost:9999 /] /socket-binding-group=standard-sockets/socket-binding=custom:add(port=8181)
[standalone@localhost:9999 /] /socket-binding-group=standard-sockets/socket-binding=custom:add(port=8181)
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Configure the HTTP Connector
The following is an example of a HTTP connector configuration:[standalone@localhost:9999 /] /subsystem=web/connector=test-connector:add(socket-binding=custom,scheme=http,protocol="HTTP/1.1",enabled=true)
[standalone@localhost:9999 /] /subsystem=web/connector=test-connector:add(socket-binding=custom,scheme=http,protocol="HTTP/1.1",enabled=true)
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
3.2.1.2.2. Configuring HTTPS Connectors 复制链接链接已复制到粘贴板!
Procedure 3.5. Configure HTTPS Connectors
Create a New Socket Binding
Use the following configuration to create a new socket binding to use when creating a HTTPS connector:[standalone@localhost:9999 /] /socket-binding-group=standard-sockets/socket-binding=https:add(port=8443)
[standalone@localhost:9999 /] /socket-binding-group=standard-sockets/socket-binding=https:add(port=8443)
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Use the Socket Binding to Create a New HTTPS Connector
Use the following configuration to create a new HTTPS connector with an unused socket binding:[standalone@localhost:9999 /] /subsystem=web/connector=test-connector:add(socket-binding=https, scheme=https, protocol="HTTP/1.1", enabled=false, secure = true)
[standalone@localhost:9999 /] /subsystem=web/connector=test-connector:add(socket-binding=https, scheme=https, protocol="HTTP/1.1", enabled=false, secure = true)
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Add the SSL Configuration
Use the following configuration to add the SSL configuration for a HTTP connector:/subsystem=web/connector=test-connector/configuration=ssl:add
/subsystem=web/connector=test-connector/configuration=ssl:add
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Note
The specified configuration uses the default SSL configuration. For JSSE, use the key stored in the location${user.home}/
.keystore
and the default passwordchangeit
. No default configuration is available for OpenSSL. As a result, theconfiguration=ssl
element must be configured correctly for use with OpenSSL. For further information, refer to the SSL documentation.Enable the Connector
Use the following configuration to enable the connector:/subsystem=web/connector=test-connector:write-attribute(name=enabled, value=true)
/subsystem=web/connector=test-connector:write-attribute(name=enabled, value=true)
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Activate the New Configuration
Use the following command to reload the server and activate the new configuration::reload
:reload
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
3.2.1.2.3. Further Information About mod_jk 复制链接链接已复制到粘贴板!
3.2.1.2.4. Configuring AJP Connectors 复制链接链接已复制到粘贴板!
Procedure 3.6. Configure AJP Connectors
Create a New Socket Binding
Use the following configuration to create a new socket binding to use when creating an AJP connector:[standalone@localhost:9999 /] /socket-binding-group=standard-sockets/socket-binding=ajp:add(port=8009)
[standalone@localhost:9999 /] /socket-binding-group=standard-sockets/socket-binding=ajp:add(port=8009)
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Use a Socket Binding to Create a New AJP Connector
Use the following configuration to create a new AJP connector with an unused socket binding:[standalone@localhost:9999 /] /subsystem=web/connector=ajp:add(socket-binding=ajp, protocol="AJP/1.3", enabled=true, scheme="http")
[standalone@localhost:9999 /] /subsystem=web/connector=ajp:add(socket-binding=ajp, protocol="AJP/1.3", enabled=true, scheme="http")
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Configure the AJP Connector
The following is an example of an AJP connector configuration:Copy to Clipboard Copied! Toggle word wrap Toggle overflow
3.2.1.2.5. Configuring Native Connectors 复制链接链接已复制到粘贴板!
Procedure 3.7. Configure Native Connectors
Configure the Native Connector
The following is an example of a native connector configuration:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Configure the SSL Information
In the provided example, configure the SSL information required.
3.2.1.3. Configuring Virtual Servers 复制链接链接已复制到粘贴板!
A virtual-server
can be declared using the default :add()
operation, as follows:
[standalone@localhost:9999 /] /subsystem=web/virtual-server=example.com:add
[standalone@localhost:9999 /] /subsystem=web/virtual-server=example.com:add
A virtual-server
can be declared using the default :remove()
operation, as follows:
[standalone@localhost:9999 /] /subsystem=web/virtual-server=example.com:remove
[standalone@localhost:9999 /] /subsystem=web/virtual-server=example.com:remove
The following is a sample configuration for the virtual-server element:
virtual-server
configuration attributes, refer to the virtual-server page.
3.2.1.4. Querying Connectors 复制链接链接已复制到粘贴板!
The following is an example of a query that seeks the bytesSent
and requestCount
attributes:
[standalone@localhost:9999 /] /subsystem=web/connector=http:read-attribute(name=bytesSent, name=requestCount) { "outcome" => "success", "result" => "3" }
[standalone@localhost:9999 /] /subsystem=web/connector=http:read-attribute(name=bytesSent, name=requestCount)
{
"outcome" => "success",
"result" => "3"
}
name
in the above configuration to one of the listed connector attributes to query connectors for specific information.
The following table is a list of the connector attributes that can be queried.
Value | Description |
---|---|
bytesSent | The number of bytes sent by the connector. |
bytesreceived | The number of bytes received by the connector (POST data). |
processingTime | The processing time used by the connector in milliseconds. |
errorCount | The number of errors that occur when requests sent by the connector are being processed. |
maxTime | The maximum amount of time to process a request. |
requestCount | The number of requests processed by the connector. |