我正在我的 Fedora 服务器上安装一个 nginx ssl 代理。
我在 /etc/nginx.conf 下创建了一个证书和密钥对。它们看起来像这样:
ls -l /etc/nginx/
total 84
...
-rw-r--r--. 1 root root 1346 Sep 20 12:11 demo.crt
-rw-r--r--. 1 root root 1679 Sep 20 12:11 demo.key
...
Run Code Online (Sandbox Code Playgroud)
作为 root,我正在尝试启动 nginx 服务:
systemctl start nginx.service
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
nginx[30854]: nginx: [emerg]
SSL_CTX_use_certificate_chain_file("/etc/nginx/demo.crt") failed (SSL: error:0200100D:system library:fopen:Permission denied...e:system lib)
nginx[30854]: nginx: configuration file /etc/nginx/nginx.conf test failed
Run Code Online (Sandbox Code Playgroud)
这些文件的权限有问题吗?