gpt4 book ai didi

ssl - 从 HTTP 重定向到 HTTPS 连接后,jboss 5.1 不工作

转载 作者:太空宇宙 更新时间:2023-11-03 14:21:14 24 4
gpt4 key购买 nike

如果重定向到 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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com