LoginSignup
22
31

More than 5 years have passed since last update.

Apacheでhttpsにリバースプロキシする

Last updated at Posted at 2013-05-30
  • Apacheでhttpsをリバースプロキシする場合はmod_sslとSSLProxyEngine onの設定が必要
    • 以下の例では次のようにプロキシする
    • [クライアント] => http => [リバースプロキシサーバー] => https => [hoge.example.com]
<VirtualHost *:80>

  RewriteEngine on
  SSLProxyEngine on

  RewriteCond %{HTTP_USER_AGENT} hogemoge
  RewriteRule ^(.*)$ https://hoge.example.com$1 [P]

はまった

  • mod_ssl入ってない、SSLProxyEngine onの設定ない状態だと500発生
  • mod_ssl入ってなくて、SSLProxyEngine onに設定したらそんなのないって怒られた
  • Amazon Linuxだとmod_sslは以下のように入れた
sudo yum install mod_ssl -y
22
31
2

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
22
31