SSL:错误:02001002:系统库:fopen:没有此文件或目录

SSL:错误:02001002:系统库:fopen:没有此文件或目录

我有 Ubantu 16.04

/etc/nginx/sites-enabled#目录default文件包含以下代码:

# HTTPS server
server {
    listen 443 ssl; # we enable SPDY here
    server_name www.bitradiology.com; # this domain must match Common Name (CN) in the SSL certificate

    root html; # irrelevant
    index index.html; # irrelevant

    ssl_certificate /root/bitradiology.chained.crt; # full path to SSL certificate and CA certificate concatenated together
    ssl_certificate_key /root/bitradiology.key; # full path to SSL key

    # performance enhancement for SSL
    ssl_stapling on;
    ssl_session_cache shared:SSL:10m;
    ssl_session_timeout 5m;

    # safety enhancement to SSL: make sure we actually use a safe cipher
    ssl_prefer_server_ciphers on;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    .............some other code........

当我运行该命令时sudo nginx -t,出现以下错误:

nginx: [emerg] BIO_new_file("/root/bitradiology.chained.crt") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/root/bitradiology.chained.crt','r') error:2006D080:BIO routines:BIO_new_file:no such file)
nginx: configuration file /etc/nginx/nginx.conf test failed

如何解决这个问题?

相关内容