security - 尽管已配置证书,但 HTTPS 连接显示不安全标志

标签 security ssl https

我已经创建了一个证书:

sudo openssl req $@ -new -x509 -days 730 -nodes -out /etc/nginx/cert.pem -keyout /etc/nginx/cert.key

但是在我的 website 上它表明它不能保存使用。如何获得保存连接的正确命令?我忘记了什么?

enter image description here

还有服务器配置:

server {
        listen 80;
        server_name www.ljtd.eu ljtd.eu;
        index index.html index.htm index.php;
        return 301 https://$server_name$request_uri;
}
server {
        listen 443 ssl;
        server_name www.ljtd.eu ljtd.eu;
        root /usr/share/nginx/html;
        index index.html index.htm index.php;

        ssl_certificate /etc/nginx/cert.pem;
        ssl_certificate_key /etc/nginx/cert.key;

        location / { 
            if (!-e $request_filename)
                {
                rewrite ^([_0-9a-zA-Z-]+)?(/wp-.*) $2 last;
                rewrite ^([_0-9a-zA-Z-]+)?(/.*\.php)$ $2 last;
                rewrite ^ /index.php last;
                }
        }
        location ~ \.php$ {
                try_files $uri =404;
                fastcgi_pass unix:/var/run/php5-fpm.sock;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                include fastcgi_params;
        }
}

最佳答案

您创建了一个 self signed certificate ,因此连接将被加密,但它是不受信任的(因为它是由您而不是公共(public)信任的证书颁发机构签名的)。

要获得受信任的证书,您需要从证书颁发机构或经销商处购买一个。价格从几美元到数百美元不等,具体取决于证书类型、覆盖范围和名称。

一些 CA 还免费提供经过域验证的证书(例如 StartSSL 或 Let's Encrypt),但在被免费一词捕获之前,请确保了解每个证书的各种功能并向权威机构购买/请求证书最适合您的需求(和价格)。

可能会影响您的决定的一些因素是:兼容性、支持的验证类型、证书的生命周期、涵盖的名称。

关于security - 尽管已配置证书,但 HTTPS 连接显示不安全标志,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35115712/

相关文章:

PHP 高级安全 session 类

php - 基于 Symfony 2 的项目的安全性和登录

iphone - JMeter 记录使用 HTTPS 的 iOS 原生应用程序导致 SSL 握手问题

ssl - RestTemplate 证书问题

c - 利用缓冲区溢出读取操作

c# - 在 C# 中验证证书

c# - 如何在 C# 中手动验证自签名证书?

ios - iOS 中 NSURLConnection 的间歇性 SSL 错误

.net - 为什么我本地 WCF 客户端的 IP 不是 127.0.0.1?

c++ - 可以在功能上防止 ram Controller 闲置吗?