在LEMP上安装Wordpress - > NET :: ERR_CERT_COMMON_NAME_INVALID

时间:2017-02-18 19:49:36

标签: wordpress ssl nginx

在我的服务器上运行了4个服务(我的网页,plex ......)。我想在这个上安装WP作为开发服务器。

感谢Let的加密,我以前的所有服务都获得了SSL证书。

我只为http设置了WP,所以我不知道为什么我的浏览器会告诉我:

Your connexion is note private [...] NET::ERR_CERT_COMMON_NAME_INVALID

我的nginx文件:

server {
    listen 80;
    listen [::]:80;

    server_name w.gfelot.xyz www.w.gfelot.xyz;

    root /var/www/wp/;
        index index.php;

    location / {
        try_files $uri $uri/ /index.php$is_args$args;
    }

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/run/php/php7.0-fpm.sock;
    }

    location ~ /\.ht {
        deny all;
    }

    location = /favicon.ico { log_not_found off; access_log off; }
    location = /robots.txt { log_not_found off; access_log off; allow all; }
    location ~* \.(css|gif|ico|jpeg|jpg|js|png)$ {
        expires max;
        log_not_found off;
    }
}

有什么想法吗?

编辑:

感谢Richard Smith我更新了我的服务器块

server {
       listen           80;
       listen           [::]:80;
       server_name      www.w.gfelot.xyz w.gfelot.xyz;
       return           301 https://w.gfelot.xyz$request_uri;
       }

server {
       listen           443 ssl http2;
       listen           [::]:443 ssl http2;
       include          snippets/ssl-gfelot.conf;
       include          snippets/ssl-params.conf;

       server_name      w.gfelot.xyz;
...

但我得到了同样的结果。

0 个答案:

没有答案
相关问题