nginx: [emerg] cannot load certificate “t“: BIO_new_file() failed (SSL: error:0200100D:system ...:

Posted Share_Boy

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了nginx: [emerg] cannot load certificate “t“: BIO_new_file() failed (SSL: error:0200100D:system ...:相关的知识,希望对你有一定的参考价值。

nginx: [emerg] cannot load certificate “/etc/nginx/hui.ifreeshare.com.crt”: BIO_new_file() failed (SSL: error:0200100D:system …:system lib)

我正在我的Fedora服务器上安装一个nginx ssl代理.
我在/ etc / nginx下创建了一个证书和密钥对.它们看起来像这样:

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


作为root,我正在尝试启动nginx服务:

systemctl start nginx.service
我收到以下错误:

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
这些文件的权限有问题吗?

你可能在执行模式下有SELinux(Fedora的默认模式):
sestatus -v
如果是这种情况,请检查审核日志,您应该找到访问错误:

ausearch -m avc -ts today | audit2allow
您也可能移动了字段而不是复制它,因此文件的安全上下文可能是错误的.

ls -lrtZ /etc/nginx/demo.*
并在需要时予以纠正:

restorecon -v -R /etc/nginx

以上是关于nginx: [emerg] cannot load certificate “t“: BIO_new_file() failed (SSL: error:0200100D:system ...:的主要内容,如果未能解决你的问题,请参考以下文章

nginx: [emerg] cannot load certificate “t“: BIO_new_file() failed (SSL: error:0200100D:system ...:

关于ImportError: libssl.so.10: cannot open shared object file: No such file or directory unable to loa

Nginx无法监听虚拟VIP的问题报:99: Cannot assign requested address

如何更正'nginx:[emerg]“流”指令在这里不允许'

[emerg]: getpwnam(“nginx”) failed

nginx - nginx:[emerg] bind()到[::]:80失败(98:地址已经在使用中)