AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 696929
Accepted
JasonGenX
JasonGenX
Asked: 2015-06-06 08:57:10 +0800 CST2015-06-06 08:57:10 +0800 CST 2015-06-06 08:57:10 +0800 CST

Debian8 上的 NGNIX 1.6.2:添加 SSL 后无法启动

  • 772

我什至无法弄清楚我从启动它时得到的错误文本

● nginx.service - A high performance web server and a reverse proxy server
   Loaded: loaded (/lib/systemd/system/nginx.service; enabled)
   Active: failed (Result: exit-code) since Fri 2015-06-05 16:52:14 UTC; 8s ago
  Process: 17285 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid (code=exited, status=0/SUCCESS)
  Process: 17273 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
  Process: 17386 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)
 Main PID: 17275 (code=exited, status=0/SUCCESS)

Jun 05 16:52:14 ip-172-31-33-65 systemd[1]: Starting A high performance web server and a reverse proxy server...
Jun 05 16:52:14 ip-172-31-33-65 nginx[17386]: nginx: [emerg] BIO_new_file("/etc/ssl/www_mydomain_me.pem") failed (SSL: error:02001002:system libr...ch file)
Jun 05 16:52:14 ip-172-31-33-65 nginx[17386]: nginx: configuration file /etc/nginx/nginx.conf test failed
Jun 05 16:52:14 ip-172-31-33-65 systemd[1]: nginx.service: control process exited, code=exited status=1
Jun 05 16:52:14 ip-172-31-33-65 systemd[1]: Failed to start A high performance web server and a reverse proxy server.
Jun 05 16:52:14 ip-172-31-33-65 systemd[1]: Unit nginx.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.

我在“站点可用”下的“默认”中的附加“服务器”配置是:

server {

        listen  443 ssl;
        ssl on;
        ssl_certificate /etc/ssl/www_example_com.pem;
        ssl_certificate_key /etc/ssl/www_example_com.key;

        access_log      /var/www/laravel/access.log;
        error_log       /var/www/laravel/error.log;

        server_name example.com;

}

如果我删除此块,我的 NGNIX 将正确重新启动并通过端口 80 为我们的 Web 应用程序提供服务。我的目标是支持 HTTPS,甚至将任何 HTTP 调用重定向到 HTTPS。我不希望我的网站上有不安全的流量。

我们今天刚刚从赛门铁克获得了 EV SSL 证书,但我无法让 NGNIX 服务器接受它或其配置。

nginx
  • 2 2 个回答
  • 2402 Views

2 个回答

  • Voted
  1. Best Answer
    Samar
    2015-06-06T09:54:32+08:002015-06-06T09:54:32+08:00

    首先是检查您指定的路径是否正确

    $ ls /etc/ssl/www_mydomain_me.{pem,key}

    如果是,请检查权限是否适合他们。如果没有,更新如下:

    $ chown root:root /etc/ssl/www_mydomain_me.{pem,key} $ chmod 600 /etc/ssl/www_mydomain_me.{pem,key}

    编辑:第一个答案与我的相似。对不起,大约在同一时间。

    • 3
  2. Hyppy
    2015-06-06T09:51:38+08:002015-06-06T09:51:38+08:00

    我将假设相关省略号错误代码的全文应该是:

     error:02001002:system library:fopen:No such file
    

    您的文件的路径不正确,或者权限/etc/ssl/www_mydomain_me.pem不正确。所有权为 root:root,除非您使用 ssl_cert 组,并且权限最多应为 600。

    • 0

相关问题

  • Gzip 与反向代理缓存

  • nginx 作为代理的行为

  • Nginx 学习资源 [关闭]

  • 提供 70,000 个静态文件 (jpg) 的最佳方式?

  • 在 Apache、LightTPD 和 Nginx Web 服务器上提供 PHP 5.x 应用程序的现状?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve