再起動後、Apacheは動作を停止します。

再起動後、Apacheは動作を停止します。

CentOS7のApacheサーバーが再起動した後、突然動作が停止しました。

有効なCAから取得した.crtおよび.keyワイルドカード証明書を使用してSSLを構成しました。

httpdサービスを再起動するとエラーはありませんが、Webページはロードされません。

私のサーバーがポート443と80でリッスンしていることを確認しました。

# netstat -tlnup | grep httpd
tcp6       0      0 :::80                   :::*                    LISTEN      6186/httpd          
tcp6       0      0 :::443                  :::*                    LISTEN      6186/httpd   

Apacheを再起動するたびに、error_logに次のように表示されます。

[ssl:warn] [pid 6186] AH02292: Init: 名前ベースの SSL 仮想ホストは、TLS サーバー名表示サポート (RFC 4366) を持つクライアントでのみ動作します。

しかし、私の証明書のCNは実際にワイルドカードです。

# openssl x509 -in /etc/pki/tls/certs/domain.com.crt -noout -subject
subject= ********************* O= ************ OU=************ OU=***************** CN=*.domain.com

私のapacheconfファイルは次のとおりです。

ServerName my.domain.com
<VirtualHost *:80>
   ServerAlias *.domain.com
   Redirect / https://my.domain.com/
</VirtualHost>

<VirtualHost *:443>
    ServerAlias *.domain.com
        DocumentRoot /var/www/html/glpi
        ErrorLog /var/log/httpd/glpi.log
    SSLEngine on
    SSLCertificateFile /etc/pki/tls/certs/domain.com.crt
    SSLCertificateKeyFile /etc/pki/tls/private/domain.com.key
</VirtualHost>

ローカルカールテストを実行すると、次のようになります。

# curl https://localhost
curl: (60) Peer's Certificate issuer is not recognized.

# curl -k https://localhost
Answer OK

# curl -v https://localhost
* About to connect() to localhost port 443 (#0)
*   Trying ::1...
* Connected to localhost (::1) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
* Server certificate:
*   subject: CN=*.domain.com,OU=*************************
*   common name: *.domain.com
*   issuer: CN=Trusted Secure Certificate Authority
* NSS error -8179 (SEC_ERROR_UNKNOWN_ISSUER)
* Peer's Certificate issuer is not recognized.
* Closing connection 0
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.

エラーはどこにあり、再起動する前に動作するのですか?

ベストアンサー1

おすすめ記事