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>
Copy to Clipboard Toggle word wrap

以下是 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>
Copy to Clipboard Toggle word wrap
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat