记录nginx启动时错误

1.BIO_new_file("/etc/nginx/../ssl/as.crt") failed

[root@  nginx]# systemctl start nginx
Job for nginx.service failed because the control process 
exited with error code. See "systemctl status nginx.service" 
and "journalctl -xe" for details.
[root@ nginx]# systemctl status nginx
 ...
Jul 08 15:33:48 datashare01 systemd[1]: Starting nginx - high performance web server...
Jul 08 15:33:48 datashare01 nginx[10680]: nginx: [emerg] BIO_new_file("/etc/nginx/../ssl/as.crt") failed (SSL: err...file)
Jul 08 15:33:48 datashare01 nginx[10680]: nginx: configuration file /etc/nginx/nginx.conf test failed
Jul 08 15:33:48 datashare01 systemd[1]: nginx.service: control process exited, code=exited status=1
Jul 08 15:33:48 datashare01 systemd[1]: Failed to start nginx - high performance web server.

之前nginx.conf配置

...
http {
    include       mime.types;
    default_type  application/octet-stream;

    ssl_certificate      ../ssl/as.crt;
    ssl_certificate_key  ../ssl/as.key;
...

解决方法:相对路径改为绝对路径

...
    ssl_certificate  /etc/nginx/ssl/as.crt;
    ssl_certificate_key /etc/nginx/ssl/as.key;
...

2.high performance web server

...
Jul 08 16:02:40 nginx systemd[1]: nginx.service start operation timed out. Terminating.
Jul 08 16:02:40 nginx systemd[1]: Failed to start nginx - high performance web server.
Jul 08 16:02:40 nginx systemd[1]: Unit nginx.service entered failed state.
Jul 08 16:02:40 nginx systemd[1]: nginx.service failed.
...

问题原因:端口冲突
解决方法:更改端口

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容