LoginSignup
4
4

More than 5 years have passed since last update.

NginxとApacheのリバースプロキシのTimeOut時のHTTPステータスの違い

Posted at

これは何?

  • リバースプロキシでTimeOutした場合、ApacheとNginxをHTTPのステータスに差があったのでメモしておく。

結論

リバースプロキシでTimeOutした場合、HTTPのステータスに差があった。

  • Apacheの場合、ステータス:502 Bad Gateway / Proxy Error
xxx.xxx.xxx.xxx - - [03/Feb/2015:03:19:16 +0000] "GET / HTTP/1.0" 502 468 "-" "ApacheBench/2.3"
  • Nginxの場合、ステータス:504 Gateway Timeout
xxx.xxx.xxx.xxx - - [03/Feb/2015:02:49:55 +0000] "GET / HTTP/1.0" 504 537 "-" "ApacheBench/2.3" "-"

Conf

nginxのConf


location / {
      proxy_pass http://xxx.xxx.xxx.xxx;
      proxy_connect_timeout x;
      proxy_read_timeout x;
      proxy_send_timeout x;
}


ApacheのConf


(略)

Timeout 1

(略)
<VirtualHost *:80>
    ProxyPass / balancer://mycluster/
    <Proxy balancer://mycluster>
        BalancerMember http://xxx.xxx.xxx.xxx/ retry=0
    </Proxy>
</VirtualHost>


4
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4