カスタム検索

2009年6月22日月曜日

GlassFIsh + Apache(mod_proxy_balancer) で SSL

mod_proxyを以下のように設定

  1. ProxyPreserveHost on  
  2. RewriteEngine  on  
  3.   
  4. RequestHeader Set Proxy-keysize 512  
  5. RequestHeader Set Proxy-ip %{REMOTE_ADDR}e  
  6.   
  7. ProxyPass /test balancer://gf/test timeout=10 stickysession=JSESSIONID  
  8. <Proxy balancer://gf>  
  9.   BalancerMember http://192.168.0.1:38080 loadfactor=10 retry=5 route=instance1  
  10.   BalancerMember http://192.168.0.1:38081 loadfactor=10 retry=5 route=instance3  
  11.   BalancerMember http://192.168.0.2:38080 loadfactor=10 retry=5 route=instance2  
  12.   BalancerMember http://192.168.0.2:38081 loadfactor=10 retry=5 route=instance4  
  13. </Proxy>  


ポイントはRequestHeaderの2カ所!

そして、GlassFishに以下の2つのプロパティを追加

設定>default-config>HTTPサービス>追加プロパティ

名前:authPassthroughEnabled
値:true

名前:proxyHandler
値:com.sun.enterprise.web.ProxyHandlerImpl

上で設定したProxy-ipとかを利用する為の設定です

参考URL
http://www.manorrock.com/documents/glassfish/proxy-ssl.html
http://docs.sun.com/app/docs/doc/820-7434/6nimnhpqr?a=view
http://docs.sun.com/app/docs/doc/820-7434/gcwrb?a=view

0 件のコメント: