前回の
apacheでのリバースプロキシ構築の続編です。
今度はバックエンド側でHTTPSのホームページがある場合になります。
この場合クライアント~フロントエンドまではHTTPS(443/tcp)で通信し、フロントエンド~バックエンドはHTTP(80/tcp)で通信する設定となります。つまり、フロントエンドのリバースプロキシにSSLアクセラレータの機能を持たせることになります。

設定についてはそんなに難しくなく、昔むかーしに記事にした、
Apache + SSL を見てリバースプロキシ側に証明書を作成します。
/etc/httpd/conf.d/ssl.confは前回のようにVirtualHostディレクティブ内にProxyの設定を記載します。
(省略)
<VirtualHost 192.168.xx.xx:443>
ErrorLog logs/ssl_error_log
TransferLog logs/ssl_access_log
LogLevel warn
SSLEngine on
SSLProtocol all -SSLv2
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
SSLCertificateFile /etc/httpd/conf/ssl.crt/example.crt
SSLCertificateKeyFile /etc/httpd/conf/ssl.key/example.key
<Files ~ ".(cgi|shtml|phtml|php3?)$">
SSLOptions +StdEnvVars
</Files>
<Directory "/var/www/cgi-bin">
SSLOptions +StdEnvVars
</Directory>
SetEnvIf User-Agent ".*MSIE.*"
nokeepalive ssl-unclean-shutdown
downgrade-1.0 force-response-1.0
CustomLog logs/ssl_request_log
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x "%r" %b"
ProxyPreserveHost On
ProxyPass /
ProxyPassReverse /
ServerName example.com
ServerAlias *.example
</VirtualHost>
あと、/etc/httpd/conf/httpd.conf内の以下の部分についても追記して同一サーバ上でHTTPSもハンドリングできるように設定が必要です。
#
# Use name-based virtual hosting.
#
#NameVirtualHost *:80
#
# NOTE: NameVirtualHost cannot be used without a port specifier
# (e.g. :80) if mod_ssl is being used, due to the nature of the
# SSL protocol.
#
NameVirtualHost 192.168.xx.xx:80
NameVirtualHost 192.168.xx.xx:443
#
これでOKなはずです。