「proxyの学習」apacheの proxy で502 error 現象の対応方法

1.エラーメッセージ:
apacheの proxy で502 error 現象が発生した

2.原因
For circumstances where mod_proxy is sending requests to an origin server that doesn’t properly implement keepalives or HTTP/1.1, there are two environment variables that can force the request to use HTTP/1.0 with no keepalive. These are set via the SetEnv directive.
These are the force-proxy-request-1.0 and proxy-nokeepalive notes.
3.対策:
httpd,confのVirtualHostに赤い内容を追加設定

 

<VirtualHost *:80>
JkMount /hr/servlet/* worker1
JkMount /hr/*.jsp worker1
JkMount /hr/*.do worker1
ServerAdmin testadmin@arkgame.com
ServerName www.arkgame.com
ServerAlias www.startnews24.co.jp
RewriteEngine On
RewriteRule ^/$ /hr/ [R,P]

SetEnv force-proxy-request-1.0.1
SetEnv proxy-nokeepalive 1
</VirtualHost>

Server

Posted by arkgame