Log the original IP address when Stash is behind a load balancer

'How Do I...' and 'How to...' Guide to Stash

このページの内容

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

症状

If Stash is behind a load balancer, you may see the load balancer's IP address in the atlassian-stash-access.log instead of the IP address of the client making the request. 

ソリューション

  • The load balancer should send a header with the IP address of the original request, some load balancers use x-forwarded-for
  • Add a Valve element to your <Stash installation directory>/conf/server.xml that is configured for the header that the load balancer is sending
<Engine name="Catalina" defaultHost="localhost">
          
    <Valve className="org.apache.catalina.valves.RemoteIpValve" 
        internalProxies="127\.0\.0\.1"  
        remoteIpHeader="x-forwarded-for" 
        remoteIpProxiesHeader="x-forwarded-by"
        protocolHeader="x-forwarded-proto" /> 
最終更新日: 2016 年 2 月 26 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.