Ubuntu 服务器 18.04 nginx 在测试 SSL 证书时崩溃并重启

Ubuntu 服务器 18.04 nginx 在测试 SSL 证书时崩溃并重启

到目前为止,我安装了 ubuntu 服务器 18.04,进行了最新的升级和 dist-upgrades,然后我使用 apt install 安装了 nginx,之后我使用 cerbot 获取 SSL 证书。

server {

server_name  www.example.com;

location / {
    root   /var/www/html;
    index  index.html index.htm;
}

error_page   500 502 503 504  /50x.html;
location = /50x.html {
    root   /usr/share/nginx/html;
}

listen [::]:443 ssl ipv6only=on; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/www.example.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/www.example.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

}

server {
    if ($host = www.example.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


listen 80 default_server;
listen [::]:80 default_server;
server_name  www.example.com;
return 404; # managed by Certbot

}

但在测试SSL 证书服务器崩溃并重启。

我已经检查了 /var/logs 但找不到与崩溃相关的内容。

相关内容