错误102 nginx SSL

6
我可以帮助您翻译这段内容。这是关于编程的问题,内容为:“我无法在我的域名上启用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;

        }

      }

有人能看出什么问题吗?

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


错误日志里有什么? - VBart
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:获取密码错误 错误:0906A068:PEM例程:PEM_do_header:密码读取错误 错误:140B0009:SSL例程:SSL_CTX_use_PrivateKey_file:PEM库) - Linus Odenring
我在想为什么当出现错误时,没有人查看错误日志?这应该是任何系统管理员的基本反应。好的。错误信息非常清楚:您的私钥受到密码保护,因此nginx无法读取它。 - VBart
1个回答

24

你应该从你的私钥中删除密语。

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

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接