`
hhlai1990
  • 浏览: 14854 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

Apache 反向代理配置与Jetty配置

 
阅读更多

 在配置文件httpd.conf最后添加

 

<IfModule mod_proxy.c>
    ProxyRequests Off
    ProxyPreserveHost On    
    ProxyErrorOverride On                                #* java_app_err_thorw_to_httpd  *#
    
    <Directory proxy:*>
        Order deny,allow
        Allow from all
    </Directory>

    ProxyPass /r http://localhost:8080/r #*min=1 smax=5 ttl=600 timeout=100*#

    ProxyPass / http://localhost:8080/
    
    SetEnv force-proxy-request-1.0 1
    SetEnv proxy-nokeepalive 1
    
</IfModule>
 

 

为了让Jetty不直接暴露http服务

 

 

 <Call name="addConnector">
      <Arg>
          <New class="org.eclipse.jetty.server.nio.SelectChannelConnector">

            <Set name="host"><Property name="jetty.host" default="localhost"></Property></Set>
            <Set name="port"><Property name="jetty.port" default="${bpmhelp_app_port}"/></Set>
            <Set name="maxIdleTime">20000</Set>
            <Set name="Acceptors">2</Set>
            <Set name="acceptQueueSize">256</Set>
            <Set name="statsOn">false</Set>
            <Set name="confidentialPort">8443</Set>
	    <Set name="lowResourcesConnections">250</Set>
	    <Set name="lowResourcesMaxIdleTime">5000</Set>
          </New>
      </Arg>
    </Call>
 

 

去掉   

  <Set name="host"><Property name="jetty.host" default="localhost"></Property></Set>

就可以直接访问jetty的服务

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics