web-dev-qa-db-ja.com

SSL証明書は通常のWebサイトでは正常に機能しますが、Apacheを介して別のアプリケーションにリクエストをプロキシするときに証明書エラーが発生します

複数のサブドメインで問題なく動作するSSL証明書をWebサーバーにインストールしました。

次に、Apacheを介してリクエストを受信する特定のサブドメインがあり、ポート6000のlocalhostで実行されているC++アプリケーション(開発済み)にプロキシする必要があります。プロキシを使用すると、証明書エラーが発生します。 C++アプリケーションは、ポート80でApacheを接続し、その罰金を介してプロキシするかのように問題ありません。

以下は、プロキシを実行するサブドメインの仮想ホスト構成です。

<VirtualHost *:443>
SSLEngine On
ServerName my-subdomain.example.com
SSLCertificateFile /etc/httpd/certs/mycert.crt
SSLCertificateKeyFile /etc/httpd/certs/mycert.key
ProxyPass / http://127.0.0.1:6000
ProxyPassReverse / http://127.0.0.1:6000
</VirtualHost>

curlを使用してリクエストを実行すると、次のメッセージが表示されます。

curl: (60) Peer's Certificate issuer is not recognized.
More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). If the default
 bundle file isn't adequate, you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.

-kを実行すると、正しい応答が得られますが、検証をオフにする必要は本当にありません。

何を試しても何も機能しませんが、プロキシに固有のものです。通常のWebサイトを提供するだけであれば、証明書の構成は問題ありません。

1
Boardy

中間証明書が見つからなかったと考えました。なぜこれが欠落しているのがリバースプロキシにのみ影響し、標準のウェブサイトを提供していないのかはわかりません。

1
Boardy