Zhiqim Httpd即知启蒙WEB容器,是Zhiqim Framework面向WEB开发的多例服务,提供更简洁配置、积木式组件模块和天然的模型模板设计。

森中灵 最后提交于1月前 增加RedirectContext方便配置HTTP:80跳转到HTTPS:443
httpd.xml4KB
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE zhiqim-config PUBLIC "-//ZHIQIM //DTD Zhiqim-Config Configuration 8.0.0//EN" "https://zhiqim.org/xmldtds/zhiqim_config_8_0_0.dtd">
<zhiqim-config>

    <group id="httpd" desc="HTTP服务">
        <item key="context" value="httpd.root" type="protected" desc="必须,HTTP服务下包括的上下文环境,多个用逗号隔开" />
        <item key="scheme" value="HTTPS" type="protected" desc="必须,HTTP或HTTPS协议" />
        <item key="port" value="443" type="protected" desc="必须,监听端口" />
        <item key="io" value="NIO" type="protected" desc="可选,IO方式,AIO|BIO|NIO,默认NIO" />
        <item key="ipAddress" value="" type="protected" desc="监听的IP地址,未配置和为空表示全IP(0.0.0.0),可配置网卡IP地址" />
        <item key="soTimeout" value="60" type="protected" desc="读流数据超时时长,单位:秒,未配置缺省60秒" />
        <item key="soLinger" value="0" type="protected" desc="关闭连接时TIME_WAIT时长,单位:秒,未配置或小于等于0表示未开启(未开启缺省240秒(2ML)" />
        <item key="poMinSize" value="5" type="protected" desc="HTTP处理线程池最小值,未配置缺省20" />
        <item key="poMaxSize" value="10" type="protected" desc="HTTP处理线程池最大值,未配置缺省200" />
        <item key="poMaxQueueSize" value="30" type="protected" desc="HTTP处理线程全部忙,等待的队列大小,未配置缺省poIdleTime的3倍" />
        <item key="poIdleTime" value="600" type="protected" desc="HTTP处理线程最大空闲时间,未配置缺省600秒" />
        <item key="accessLog" value="false" type="protected" desc="HTTP访问日志是否打印true|false,未配置缺省false,为true时还配合logging配置" />
        
        <!-- 以下为HTTPS专用 -->
        <item key="keystorePath" value="./conf/https_all/keystore.jks" type="protected" desc="HTTPS时必须,SSL密钥文件路径" />
        <item key="keystorePass" value="123456" type="protected" desc="HTTPS时必须,SSL密钥文件密码" />
        <item key="truststorePath" value="./conf/https_all/trust.jks" type="protected" desc="SSL信任CA文件路径" />
        <item key="truststorePass" value="123456" type="protected" desc="SSL信任CA文件密码,当truststorePath有配置时该项必须" />
        <item key="clientAuth" value="false" type="protected" desc="是否需要客户端认证,未配置缺省false" />
    </group>
        
    <group id="httpd.root" desc="HTTP根上下文环境">
        <item key="domain" value="" type="protected" desc="上下文环境对应的域名,多个逗号隔开" />
        <item key="path" value="/" type="protected" desc="必须,上下文环境路径" />
        <item key="resourceType" value="directory" type="protected" desc="资源目录类型classPath|directory" />
        <item key="resourcePath" value="./resource" type="protected" desc="资源目录" />
        <item key="welcomeUrl" value="index.htm" type="protected" desc="欢迎页" />
        <item key="notFoundUrl" value="index.htm" type="protected" desc="找不到页面时转到该页" />
        <item key="filter" value="/conf/*,/ftml/*" type="protected" desc="过滤访问,默认为空,匹配上的访问时返回403错误,多个用逗号隔开,如/conf/*" />
        <item key="encoding" value="UTF-8" type="protected" desc="服务默认编码,未配置缺省UTF-8" />
        
        <!-- 以下为ZmlContext专用 -->
        <item key="useCookie" value="true" type="protected" desc="是否使用cookie,默认为true" />
        <item key="sessionManager" value="org.zhiqim.httpd.session.HashSessionManager" type="protected" desc="会话管理器,未配置缺省内置的HashSessionManager" />
        <item key="sessionTimeout" value="1800" type="protected" desc="会话超时时长,单位:秒,最小20秒,未配置缺省1800秒(30分钟)" />
        <item key="sessionIdName" value="jsessionid" type="protected" desc="cookie或redirect-url时的取sessionid的名称,未配置缺省jsessionid" />
        <item key="sessionParameter" value="" type="protected" desc="会话管理器的其他参数" />
        <item key="zml.pattern" value="*.htm,*.zml" type="protected" desc="ZML模式,未配置缺省为*.htm,*.ftm,*.ftml" />
        <item key="zml.soIdleTime" value="86400" type="protected" desc="ZML保持时长,单位:秒,未配置缺省24小时" />
        <item key="zml.poIdleTime" value="3600" type="protected" desc="ZML空闲时长,单位:秒,未配置缺省1小时" />
    </group>

</zhiqim-config>