JBOSS 5.1 HTTPS Configuration
How can I enable the HTTPS on my JBOSS 5.1. First of all, I follow the tomcat strategy.
Configure the server.xml
D:\tool\jboss-5.1.0.GA\server\default\deploy\jbossweb.sar\server.xml
...snip...
<Connector protocol="HTTP/1.1" port="80" address="0.0.0.0"
connectionTimeout="20000" redirectPort="443" />
...snip...
<Connector protocol="AJP/1.3" port="8009" address="0.0.0.0"
redirectPort="443" />
...snip...
<Connector
protocol="HTTP/1.1"
SSLEnabled="true"
port="443"
address="0.0.0.0"
scheme="https"
secure="true"
clientAuth="false"
keystoreFile="jks file"
keystorePass="password"
sslProtocol = "TLS" />
...snip...
But still, when I visit the HTTPS page, the browser or rather say, the server send 302 to 8443 port, not 443 according to my configuration. Why does that happen? I go over the google and blog from others.
There is another configuration file placed here
D:\tool\jboss-5.1.0.GA\server\default\conf\bindingservice.beans\META-INF\bindings-jboss-beans.xml
I just find all the 8443 in this confugration file, and replace them to 443.
...snip...
<bean class="org.jboss.services.binding.ServiceBindingMetadata">
<property name="serviceName">jboss.web:service=WebServer</property>
<property name="bindingName">HttpsConnector</property>
<property name="port">443</property>
<property name="description">JBoss Web HTTPS connector socket</property>
</bean>
...snip...
<xsl:template match = "Connector">
<Connector>
<xsl:for-each select="@*">
<xsl:choose>
<xsl:when test="(name() = 'port' and . = '8080')">
<xsl:attribute name="port"><xsl:value-of select="$port" /></xsl:attribute>
</xsl:when>
<xsl:when test="(name() = 'port' and . = '8009')">
<xsl:attribute name="port"><xsl:value-of select="$portAJP" /></xsl:attribute>
</xsl:when>
<xsl:when test="(name() = 'redirectPort')">
<xsl:attribute name="redirectPort"><xsl:value-of select="$portHttps" /></xsl:attribute>
</xsl:when>
<xsl:when test="(name() = 'port' and . = '443')">
<xsl:attribute name="port"><xsl:value-of select="$portHttps" /></xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
<xsl:apply-templates/>
</Connector>
</xsl:template>
...snip...
It works properly now.
references:
http://www.mentby.com/me-self/8443-to-443-problem.html
JBOSS 5.1 HTTPS Configuration
猜你喜欢
转载自sillycat.iteye.com/blog/1592970
今日推荐
周排行