【问题标题】:Error 102 nginx SSL错误 102 nginx SSL
【发布时间】:2013-08-08 16:50:15
【问题描述】:

我无法在我的域上使用 SSL。我只是收到 102 连接被拒绝。

这里是配置:

  server {
        listen 443 default_server ssl;
    ssl_certificate /etc/nginx/ssl/www.foreningsdriv.se.crt;
    ssl_certificate_key /etc/nginx/ssl/server.key;
     #if the URL with .php tacked on is a valid PHP file, rewrite the URL to .php
if (-f $document_root$uri.php) {
rewrite ^(.*)$ /$uri.php;
}

        root /var/www/foreningsdriv.se;
        index index.php index.html index.htm;
        server_name www.foreningsdriv.se;

        location / {
                try_files $uri $uri/ /index.html;
        }

        error_page 404 /404.html;

        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        location ~ \.php$ {
                #fastcgi_pass 127.0.0.1:9000;
                # With php5-fpm:
                fastcgi_pass unix:/var/run/php5-fpm.sock;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                include fastcgi_params;

        }

      }

谁能看出有什么不对?

我已尝试重新颁发证书,但没有帮助。

【问题讨论】:

  • 错误日志中有什么内容?
  • 2013/08/07 12:35:51 [emerg] 4923#0: SSL_CTX_use_PrivateKey_file("/etc/nginx/ssl/server.key") 失败(SSL:错误:0906406D:PEM 例程:PEM_def_callback:problems getting password error:0906A068:PEM routines:PEM_do_header:bad password read error:140B0009:SSL routines:SSL_CTX_use_PrivateKey_file:PEM lib)
  • 我想知道为什么当一些错误发生时没有人查看错误日志?这一定是任何系统管理员的基本反应。好的。错误信息非常清楚:您的私钥受密码保护,因此 nginx 无法读取。

标签: ssl https nginx


【解决方案1】:

您应该从您的私钥中删除密码。

openssl rsa -in original.key -out unencripted.key

【讨论】:

    猜你喜欢
    • 2015-02-03
    • 2016-02-04
    • 2017-11-21
    • 2016-10-25
    • 2018-07-02
    • 2016-10-02
    • 2015-03-16
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多