如果重定向到 HTTPS url(端口 8443),jboss 服务器将无法工作,这里是 WAR 包 web.xml 配置:
<security-constraint>
<web-resource-collection>
<web-resource-name>HtmlAdaptor</web-resource-name>
<description>Security for all users</description>
<url-pattern>/all/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>role01</role-name>
</auth-constraint>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
如果我改变
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
到
<transport-guarantee>NONE</transport-guarantee>
服务器可以在8081端口接受HTTP请求。
SSL连接需要注意哪些配置? 任何额外的配置?
最佳答案
jboss4.x 和 jboss5.x server.xml 的配置不同: jboss4.x 上的前 server.xml:
<Connector port="8443" address="{jboss.bind.address}"
maxThreads="100" strategy="ms" maxHttpHeaderSize="8192"
在 jboss5.x 上应该是这样的:
<Connector protocol="HTTP/1.1" SSLEnabled="true"
port="8443" address="{jboss.bind.address}"
maxThreads="100" strategy="ms" maxHttpHeaderSize="8192"
SSLEnabled 是 jboss5.x 所必需的
关于ssl - 从 HTTP 重定向到 HTTPS 连接后,jboss 5.1 不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4063110/