在JBoss EAP 6.4中使用httpd和mod_jk

时间:2015-06-30 09:03:17

标签: jboss7.x httpd.conf mod-jk jboss-eap-6

我正在尝试将mod_jk,httpd与JBoss EAP 6.4集成,但我无法在不使用端口号的情况下进行连接。

我的standalone.xml文件包含以下条目:

<subsystem xmlns="urn:jboss:domain:web:2.2" default-virtual-server="default-host" instance-id="/opt/java/sun-jdk-1.7" native="false">
            <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>
            <connector name="ajp" protocol="AJP/1.3" scheme="http" socket-binding="ajp" enabled="true"/>
            <virtual-server name="default-host" enable-welcome-root="false">
                <alias name="localhost"/>
                <alias name="example.com"/>
            </virtual-server>
        </subsystem>

端口配置为:

<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
        <socket-binding name="management-native" interface="management" port="${jboss.management.native.port:7204}"/>
        <socket-binding name="management-http" interface="management" port="${jboss.management.http.port:7203}"/>
        <socket-binding name="management-https" interface="management" port="${jboss.management.https.port:7205}"/>
        <socket-binding name="http" port="7201"/>
        <socket-binding name="https" port="7202"/>
        <socket-binding name="ajp" port="7206"/>
        <socket-binding name="remoting" port="7207"/>
        <socket-binding name="txn-recovery-environment" port="7208"/>
        <socket-binding name="txn-status-manager" port="7209"/>
        <socket-binding name="ajb" port="7209"/>
        <outbound-socket-binding name="mail-smtp">
            <remote-destination host="localhost" port="25"/>
        </outbound-socket-binding>
    </socket-binding-group>

我的worker.properties(/ httpd / conf /)有

worker.list=loadbalancer,status
# Define Node1
# modify the host as your host IP or DNS name.
worker.node1.port=7206
worker.node1.host=localhost
worker.node1.type=ajp13
worker.node1.lbfactor=1
worker.node1.prepost_timeout=10000 #Not required if using ping_mode=A
worker.node1.connect_timeout=10000 #Not required if using ping_mode=A
worker.node1.ping_mode=A #As of mod_jk 1.2.27

# Load-balancing behaviour
worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=node1
worker.loadbalancer.sticky_session=1

# Status worker for managing load balancer
worker.status.type=status

步骤,我跟着用mod_jk配置jboss是:

./jboss-cli.sh
connect localhost:7204
/profile=/subsystem=web:write-attribute(name="instance-id",value="/opt/java/sun-jdk-1.7")
/system-property=UseJK/:add(value=true)
/subsystem=web:read-children-names(child-type=connector)
/subsystem=web/connector=http:read-resource(recursive=true)
{
    "outcome" => "success",
    "result" => {
        "enable-lookups" => false,
        "enabled" => true,
        "executor" => undefined,
        "max-connections" => undefined,
        "max-post-size" => 2097152,
        "max-save-post-size" => 4096,
        "name" => "http",
        "protocol" => "HTTP/1.1",
        "proxy-binding" => undefined,
        "proxy-name" => undefined,
        "proxy-port" => undefined,
        "redirect-binding" => undefined,
        "redirect-port" => 443,
        "scheme" => "http",
        "secure" => false,
        "socket-binding" => "http",
        "virtual-server" => undefined,
        "configuration" => undefined
    },
    "response-headers" => {"process-state" => "reload-required"}
}
/socket-binding-group=standard-sockets/socket-binding=ajb:add(port=7209)
/subsystem=web/connector=ajp:add(socket-binding=ajp, protocol="AJP/1.3", enabled=true, scheme="http")

任何指针可能是什么问题?

0 个答案:

没有答案