jboss7-Undertow web子模块配置

1、需要启用模块

<extension module="org.wildfly.extension.undertow"/>

2、默认配置如下

<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>

3、配置缓存,静态文件会被缓存,一般情况默认就可以,如需修改,例子如下

<buffer-caches>
  <buffer-cache name="default" buffer-size="1024" buffers-per-region="1024" max-regions="10"/>
</buffer-caches>

4、server,由多个子标记组成,如http-listener,host配置https和域名一个是配置http-listener,一个是配置host,详情请查看敝人写的其它jboss笔记

<server name="default-server"default-host="default-host"servlet-container="default">

5、http connector链接,就是上面的http-listener,对应的类型有HTTP, HTTPS and AJP,所有链接都有的属性,我就直接摘抄官方。

这里需要注意一下可以配置链接编码哦。老版jboss7的配置不是在这里,有兴趣看敝人写的其它一篇

Attribute Description
socket-binding The socket binding to use. This determines the address and port the listener listens on.
worker A reference to an XNIO worker, as defined in the IO subsystem. The worker that is in use controls the IO and blocking thread pool.
buffer-pool A reference to a buffer pool as defined in the IO subsystem. These buffers are used internally to read and write requests. In general these should be at least 8k, unless you are in a memory constrained environment.
enabled If the connector is enabled.
max-post-size The maximum size of incoming post requests that is allowed.
buffer-pipelined-data If responses to HTTP pipelined requests should be buffered, and send out in a single write. This can improve performance if HTTP pipe lining is in use and responses are small.
max-header-size The maximum size of a HTTP header block that is allowed. Responses with to much data in their header block will have the request terminated and a bad request response send.
max-parameters The maximum number of query or path parameters that are allowed. This limit exists to prevent hash collision based DOS attacks.
max-headers The maximum number of headers that are allowed. This limit exists to prevent hash collision based DOS attacks.
max-cookies The maximum number of cookies that are allowed. This limit exists to prevent hash collision based DOS attacks.
allow-encoded-slash Set this to true if you want the server to decode percent encoded slash characters. This is probably a bad idea, as it can have security implications, due to different servers interpreting the slash differently. Only enable this if you have a legacy application that requires it.
decode-url If the URL should be decoded. If this is not set to true then percent encoded characters in the URL will be left as is.
url-charset The charset to decode the URL to.
always-set-keep-alive If the ‘Connection: keep-alive‘ header should be added to all responses, even if not required by spec.
<https-listener name="default" socket-binding="https" security-realm="ssl-realm" />
<ajp-listener name="default" socket-binding="ajp" />
<http-listener name="default" socket-binding="http"  />

https有些自己的属性

Attribute Description
security-realm The security realm to use for the SSL configuration. See Security realm examples for how to configure it: Examples
verify-client One of either NOT_REQUESTED, REQUESTED or REQUIRED. If client cert auth is in use this should be either REQUESTED or REQUIRED.
enabled-cipher-suites A list of cypher suit names that are allowed.

http的专有属性

Attribute Description
certificate-forwarding If this is set to true then the HTTP listener will read a client certificate from the SSL_CLIENT_CERT header. This allows client cert authentication to be used, even if the server does not have a direct SSL connection to the end user. This should only be enabled for servers behind a proxy that has been configured to always set these headers.
redirect-socket The socket binding to redirect requests that require security too.
proxy-address-forwarding If this is enabled then the X-Forwarded-For and X-Forwarded-Proto headers will be used to determine the peer address. This allows applications that are behind a proxy to see the real address of the client, rather than the address of the proxy.

AJP就没有自己的啥属性了

6、host主机配置,其实就是配置域名,name是名称,可以被其它文件引用,alias就是别名,也是可以被其它配置文件引用的,default-web-module就是默认被使用的war包名字,可参看鄙人jboos7域名配置

Attribute Description
name The virtual host name
alias A whitespace separated list of additional host names that should be matched
default-web-module The name of a deployment that should be used to serve up requests that do not match anything.

7、其它几个不做详述了

时间: 2024-08-06 21:16:35

jboss7-Undertow web子模块配置的相关文章

web.xml 配置applicationContext.xml

web.xml中classpath:和classpath*:  有什么区别? classpath:只会到你的class路径中查找找文件; classpath*:不仅包含class路径,还包括jar文件中(class路径)进行查找. 有时候会用模糊匹配的方式配置多配置文件. 但是如果配置文件是在jar包里,模糊匹配就找不到了.可以用逗号隔开的方式配置多个配置文件. 如: <listener>  <listener-class>org.springframework.web.conte

Windws Server 2008 R2 WEB环境配置之IIS7/IIS7.5+FastCGI+PHP 5.6.4+MYSQL+phpMyAdmin

本篇为WEB环境配置的汇总篇,其中PHP以FASTCGI方式来运行,这种方式性能更高.经过配置后,我们的服务器将同时可以运行PHP和.NET的程序,属称全能服务器.所有配置可以根据自身实际需要进行增减. 准备 先准备以下软件版本:    (程序包连接已下架,自行到官网下载) PHP,MYSQL,phpMyAdmin 1.PHP在windows 上二种运行方式: ISAPI和FastCGI Thread Safe 和Non Thread Safe FastCGI执行方式是以单一线程来执行操作,所以

WCF WEB API配置

Web.config配置 <system.serviceModel> <services> <service name="WCFServiceWebRole2.Service1"> <endpoint contract="WCFServiceWebRole2.IService1" binding="webHttpBinding" behaviorConfiguration="web"

Spring MVC的web.xml配置详解(转)

出处http://blog.csdn.net/u010796790 1.spring 框架解决字符串编码问题:过滤器 CharacterEncodingFilter(filter-name) 2.在web.xml配置监听器ContextLoaderListener(listener-class) ContextLoaderListener的作用就是启动Web容器时,自动装配ApplicationContext的配置信息.因为它实现了ServletContextListener这个接口,在web.

Asp.net中的web.config配置

目录 Asp.net中的web.config配置... 1 一. 配置文件保存位置... 2 二. 配置文件加载顺序... 2 三. 配置文件节点介绍... 3 1. . 3 2. . 5 3. . 5 4. . 6 . 11 四. 针对配置文件的一些编程操作... 11 1. 运行时进行配置文件的修改... 11 2. 配置节点的加密... 12 web.config是asp.net中保存配置信息(比如数据库连接字符串等)的重要文件.它是基于xml的文本文件方式放在Web应用程序的任何目录中,

asp.net中web.config配置节点大全详解【转】

web.config 文件查找规则: (1)如果在当前页面所在目录下存在web.config文件,查看是否存在所要查找的结点名称,如果存在返回结果并停止查找. (2)如果当前页面所在目录下不存在web.config文件或者web.config文件中不存在该结点名,则查找它的上级目录,直到网站的根目录. (3)如果网站根目录下不存在web.config文件或者web.config文件中不存在该节点名则在%windir%"Microsoft.NET"Framework"v2.0.

web应用配置

tomcat 的 server.html 配置文件 加在</Host>之上 <Context path="/itcast" docBase="c:\news" /> path虚拟目录 docBase 实际目录 http://localhost:8080/itcast/1.html web应用配置,布布扣,bubuko.com

maven工程web层的web.xml配置文档内容

下面是web层,web.xml配置文档里面需要配置的东西: 1.lo4j配置 2.读取spring文件配置 3.设计路径变量值 4.spring字符集过滤器 5.登陆过滤器 6.springMVC核心配置 7.session过期时间 8.错误页面跳转 以下是实例: <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSch

基于注解的Spring MVC(所需jar包,web.xml配置,Spring文件配置,@Controller,@RequestMapping,@RequestParam,model填參,EL取值)

1.加入jar 2.web.xml配置: <?xml version="1.0" encoding="UTF-8"? > <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocati