gpt4 book ai didi

websphere - WLP::更改 http 上的默认上下文根

转载 作者:行者123 更新时间:2023-12-02 22:52:36 26 4
gpt4 key购买 nike

当我在我的 websphere liberty 配置文件 v8.5.5 上执行 http get 时(假设 http://my.domain.com ),我会看到一个漂亮的页面,其中包含其他内容“欢迎使用 WebSphere Application Server V8.5 Liberty Profile”

看起来像这样http://rdt1.demos.ibm.com/

如何配置我的服务器以不显示此页面,并可能将我的请求重定向到 https 上的登录页面?

这是与要安装的新应用程序的新上下文根相关的配置吗?喜欢下面这个答案吗? How to make "HTTPS redirect" work on WebSphere Application Server Liberty Profile?我觉得这应该是在 server.xml 上配置的东西,但我找不到任何对此的引用。

提前致谢!

最佳答案

您可以通过将以下内容添加到 server.xml 文件来关闭该页面:

<httpDispatcher enableWelcomePage="false" />

http://www-01.ibm.com/support/knowledgecenter/api/content/nl/en-us/SSRTLW_9.0.0/com.ibm.websphere.wlp.nd.multiplatform.doc/autodita/rwlp_metatype_4ic.html#mtFile119

编辑:

我应该澄清一下,其他答案也是正确的。如果您安装的应用程序以“/”作为上下文根,则将使用该应用程序而不是主页。

如果您将以下内容添加到该应用程序的 web.xml 中:

<security-constraint>
<display-name>Some constraint</display-name>
<web-resource-collection>
<web-resource-name>All</web-resource-name>
<description>All URLs</description>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<description>All users</description>
<role-name>User</role-name>
</auth-constraint>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>

您将获得所需的 https 重定向。

其他编辑(每条评论),以下是如何设置重定向的更完整示例: How to make "HTTPS redirect" work on WebSphere Application Server Liberty Profile?

关于websphere - WLP::更改 http 上的默认上下文根,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26873827/

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