1.5. 配置默认欢迎 Web 应用程序
JBoss EAP 包含一个默认的 Welcome
应用,默认显示在端口 8080
的根上下文中。
此默认 Welcome
应用可替换为您自己的 Web 应用。这可以通过以下两种方式之一进行配置:
更改 welcome-content 文件处理程序
修改现有的
welcome-content
文件处理程序路径,以指向新部署。/subsystem=undertow/configuration=handler/file=welcome-content:write-attribute(name=path,value="/path/to/content")
注意或者,您也可以创建供服务器的 root 使用的其他文件处理程序。
/subsystem=undertow/configuration=handler/file=NEW_FILE_HANDLER:add(path="/path/to/content") /subsystem=undertow/server=default-server/host=default-host/location=\/:write-attribute(name=handler,value=NEW_FILE_HANDLER)
重新加载服务器以使更改生效。
reload
更改 default-web-module
将部署的 Web 应用映射到服务器的根目录.
/subsystem=undertow/server=default-server/host=default-host:write-attribute(name=default-web-module,value=hello.war)
重新加载服务器以使更改生效。
reload
禁用默认欢迎 Web 应用程序
删除
default-host
的位置
条目/
来禁用 welcome 应用。/subsystem=undertow/server=default-server/host=default-host/location=\/:remove
重新加载服务器以使更改生效。
reload