Apache

in  

Apacheについて

proxy

<追記> 下記の手順ではなく、もっと簡易な設定でも動作が確認できた。

# SSL Proxy有効
SSLProxyEngine On
ProxyPass /3.1.0/ https://hoge.gside.org/3.1.0/ retry=3
ProxyPassReverse / https://hoge.gside.org/
<Location "/3.1.0/">
    RequestHeader set Host hoge.gside.org
</Location>

<旧バージョン>

# SSL Proxy有効
SSLProxyEngine On
SSLProxyVerify none
SSLProxyCheckPeerName off
ProxyPass /3.1.0/ https://hoge.gside.org/3.1.0/ retry=3
ProxyPassReverse / https://hoge.gside.org/

<Location "/3.1.0/">
    RequestHeader set Host hoge.gside.org
    SetEnv force-proxy-request-1.0 1
    SetEnv proxy-nokeepalive 1
</Location>

プロトコルの調整 HTTP/1.0 keepalived offでリクエストを送る http://httpd.apache.org/docs/2.4/ja/mod/mod%5Fproxy.html

当初、proxy-initial-not-pooled で調整したが下記エラーが解消しなかった。 “proxy: error reading status line from remote server”

設定の判定順序

http://kei-sakaki.jp/2013/08/06/apache-http-server-configuration-url/

  1. Rewrite系
  2. ProxyPass系
  3. Redirect系

SetEnvの値はRewriteCondで見れない

HTTPからHTTPSへのリダイレクト

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R,L]

Share