4.5. Web 服务器配置更改
4.5.1. 将 Web 子系统替换为 Undertow 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
Undertow 取代 JBoss Web 作为 JBoss EAP 7 中的 Web 服务器。这意味着旧版 Web 子系统配置必须迁移到新的 JBoss EAP 7 undertow 子系统配置。
-
服务器
配置文件中的 Theurn:jboss:domain:web:2.2子系统配置命名空间已被urn:jboss:domain:undertow:10.0命名空间取代。 -
EAP_HOME/modules/system/layers/base/中的org.jboss.as.web扩展模块已被org.wildfly.extension.undertow扩展模块取代。
您可以使用管理 CLI 迁移 操作,将 Web 子系统迁移到服务器配置文件中的 undertow。但是,请注意,此操作无法迁移所有 JBoss Web 子系统配置。如果您看到"migration-warning"条目,则必须运行其他管理 CLI 命令将这些配置迁移到 Undertow。如需有关管理 CLI 迁移 操作的更多信息,请参阅 管理 CLI 迁移操作。
以下是 JBoss EAP 6.4 中默认 Web 子系统配置的示例:
<subsystem xmlns="urn:jboss:domain:web:2.2" default-virtual-server="default-host" native="false">
<connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>
<virtual-server name="default-host" enable-welcome-root="true">
<alias name="localhost"/>
<alias name="example.com"/>
</virtual-server>
</subsystem>
以下是 JBoss EAP 7.3 中默认 undertow 子系统配置的示例:
<subsystem xmlns="urn:jboss:domain:undertow:10.0" default-server="default-server" default-virtual-host="default-host" default-servlet-container="default" default-security-domain="other">
<buffer-cache name="default"/>
<server name="default-server">
<http-listener name="default" socket-binding="http" redirect-socket="https" enable-http2="true"/>
<https-listener name="https" socket-binding="https" security-realm="ApplicationRealm" enable-http2="true"/>
<host name="default-host" alias="localhost">
<location name="/" handler="welcome-content"/>
<http-invoker security-realm="ApplicationRealm"/>
</host>
</server>
...
</subsystem>