<commit_before>[[Undertow]]
= Undertow subsystem configuration

****

*Web subsystem was replaced in WildFly 8 with Undertow.*

****

There are two main parts to the undertow subsystem, which are server and
Servlet container configuration, as well as some ancillary items.
Advanced topics like load balancing and failover are covered on the
"High Availability Guide". The default configuration does is suitable
for most use cases and provides reasonable performance settings.

*Required extension:*

[source,xml,options="nowrap"]
----
<extension module="org.wildfly.extension.undertow" />
----

*Basic subsystem configuration example:*

[source,xml,options="nowrap"]
----
<subsystem xmlns="urn:jboss:domain:undertow:1.0">
        <buffer-caches>
            <buffer-cache name="default" buffer-size="1024" buffers-per-region="1024" max-regions="10"/>
        </buffer-caches>
        <server name="default-server">
            <http-listener name="default" socket-binding="http" />
            <host name="default-host" alias="localhost">
                <location name="/" handler="welcome-content" />
            </host>
        </server>
        <servlet-container name="default" default-buffer-cache="default" stack-trace-on-error="local-only" >
            <jsp-config/>
            <persistent-sessions/>
        </servlet-container>
        <handlers>
            <file name="welcome-content" path="${jboss.home.dir}/welcome-content" directory-listing="true"/>
        </handlers>
    </subsystem>
----

*Dependencies on other subsystems:*

IO Subsystem
<commit_msg>[WFLY-12933] At Undertow subsystem configuration document, add a table describing the subsystem attributes<commit_after>[[Undertow]]
= Undertow subsystem configuration

****

*Web subsystem was replaced in WildFly 8 with Undertow.*

****

There are two main parts to the undertow subsystem, which are server and
Servlet container configuration, as well as some ancillary items.
Advanced topics like load balancing and failover are covered on the
"High Availability Guide". The default configuration does is suitable
for most use cases and provides reasonable performance settings.

*Required extension:*

[source,xml,options="nowrap"]
----
<extension module="org.wildfly.extension.undertow" />
----

*Basic subsystem configuration example:*

[source,xml,options="nowrap"]
----
<subsystem xmlns="urn:jboss:domain:undertow:11.0">
        <buffer-cache name="default" buffer-size="1024" buffers-per-region="1024" max-regions="10"/>
        <server name="default-server">
            <http-listener name="default" socket-binding="http" />
            <host name="default-host" alias="localhost">
                <location name="/" handler="welcome-content" />
            </host>
        </server>
        <servlet-container name="default" default-buffer-cache="default" stack-trace-on-error="local-only" >
            <jsp-config/>
            <persistent-sessions/>
        </servlet-container>
        <handlers>
            <file name="welcome-content" path="${jboss.home.dir}/welcome-content" directory-listing="true"/>
        </handlers>
    </subsystem>
----
[cols=",",options="header"]
|=======================================================================
|Attribute |Description
|default-server | the default server to use for deployments
|default-virtual-host | the default virtual host to use for deployments
|default-servlet-container | the default servlet container to use for deployments
|instance-id | the id of Undertow. Defaults to "${jboss.node.name}" if undefined
|default-security-domain |the default security domain used by web deployments
|statistics-enabled | set this to true to enable statistics gathering for Undertow subsystem
|=======================================================================


*Dependencies on other subsystems:*

IO Subsystem

{'fraction_non_alphanumeric': 0.15784008307372793, 'fraction_numerical': 0.008307372793354102, 'mean_word_length': 3.750924784217016, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 39, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '831387', 'n_tokens_mistral': 1055, 'n_tokens_neox': 973, 'n_words': 302}