複数のサイトをホストしているUbuntu(17.04)サーバーを実行しています。私が今ホスティングしているサイトの1つは、電子商取引サイトで、SSL証明書が必要です。私は多くのチュートリアルを行ってきましたが、すべてのステップを踏んできましたが、HTTPSを使用してサイトにアクセスすると、エラーページが表示されます。複数の仮想ホストを持つubuntuサーバーでSSLが動作しない
下のスクリーンショットのドメイン名は偽です。
最初に私はComodoからSSL証明書を購入しました。私は、このコマンドを使用して生成されたので、彼らは、サーバーからCSRを要請:
openssl req -new -newkey rsa:2048 -nodes -keyout domain.key -out domain.csr
私はCSRを貼り付けると問題なくCRTを生成しました。今私はコモドからCRTを持っており、安全な接続のための私のバーチャルホストを更新:
<VirtualHost *:443>
ServerAdmin [email protected]
ServerName www.domain.com
ServerAlias domain.com
DirectoryIndex index.php
DocumentRoot /var/www/html/domain
SSLEngine on
SSLCertificateFile /etc/ssl/certs/www_domain_com.crt
SSLCertificateKeyFile /etc/ssl/private/domain_com.key
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
私はその後、走っ:
a2enmod ssl
をそして最後にApacheを再起動します。私はこれだけエラーページを見ているサイトに行くと今:apacheのエラーを見て
間違っているかもしれないものにだけヒントを記録以下のメッセージです:
[Thu Aug 17 16:42:42.746221 2017] [mpm_prefork:notice] [pid 19871] AH00169: caught SIGTERM, shutting down
[Thu Aug 17 16:42:42.836087 2017] [ssl:warn] [pid 22306] AH01909: 2001:4802:7801:103:be76:4eff:fe20:7c04:443:0 server certificate does NOT include an ID which matches the server name
[Thu Aug 17 16:42:42.874200 2017] [ssl:warn] [pid 22316] AH01909: 2001:4802:7801:103:be76:4eff:fe20:7c04:443:0 server certificate does NOT include an ID which matches the server name
[Thu Aug 17 16:42:42.878354 2017] [mpm_prefork:notice] [pid 22316] AH00163: Apache/2.4.25 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Thu Aug 17 16:42:42.878374 2017] [core:notice] [pid 22316] AH00094: Command line: '/usr/sbin/apache2'
本当にありがとうございます。このサーバーがSSL Webサイトを初めて持っているので、openSSLなどで一歩足りないかもしれません。