启动nginx命令: docker run --name nginx -p 80:80 -p 443:443 \ -v /usr/local/nginx/html:/usr/share/nginx/html \ -v /usr/local/nginx/conf/nginx.conf:/etc/nginx/nginx.conf/ \ -v /usr/local/nginx/conf.d:/etc/nginx/conf.d/ \ -v /usr/local/nginx/logs:/var/log/nginx \ -v /usr/local/nginx/ssl:/etc/nginx/ssl \ --privileged=true -d --restart=always nginx 报错 nginx: [emerg] cannot load certificate "/etc/nginx/ssl/www.huodongchi.com.pem": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/etc/nginx/ssl/www.huodongchi.com.pem','r') error:2006D080:BIO routines:BIO_new_file:no such file)
时间: 2023-08-02 09:06:41 浏览: 146
如何查看docker run启动参数命令(推荐)
这个报错是因为无法加载证书文件 "/etc/nginx/ssl/www.huodongchi.com.pem",原因是该文件不存在或者路径不正确。请确保在容器内的路径 "/etc/nginx/ssl" 下存在名为 "www.huodongchi.com.pem" 的证书文件,并且路径正确。你可以进入容器内部检查路径和文件是否正确。
阅读全文