LoginSignup
0
0

CentOS stream 9 + nginx SSL証明書が読み込めないエラー

Last updated at Posted at 2023-11-10

新しくCentOS stream9で nginxにSSLの設定をしようとしたところ、正しくconfファイルを設定しても下記エラーになったさいすこしハマったのでメモ。

/etc/nginx/conf.d/default.conf

    ssl_certificate /etc/nginx/ssl/certs/your_domain.crt;
    ssl_certificate_key /etc/nginx/ssl/private/your_domain.key;

keyやcrt等証明書ファイルのchownchmodで証明書ファイルの権限を調整しても駄目。
また、作り直して、ペアチェック等もしても問題なし、それでも駄目。

原因はselinuxで、下記実行したら解決しましたw

restorecon -v -R /etc/nginx
0
0
0

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
0
0