Установил с помощью Let's Encrypt сертификат свой сайт lisky.site, но при попытке подключения на "lisky.site" - ошибка ERR_CERT_COMMON_NAME_INVALID.
Выполнил тест по
lisky.site тут, результат:
Но при тесте
www.lisky.site все в порядке:
Конфиг nginx:
spoilerserver {
root /var/www/html;
# Add index.php to the list if you are using PHP
index index.php;
server_name lisky.site www.lisky.site;
location ~* \.(git|txt|md)$ {
deny all;
return 404;
}
# pass PHP scripts to FastCGI server
#
location ~ \.php$ {
include snippets/fastcgi-php.conf;
#
# # With php-fpm (or other unix sockets):
fastcgi_pass unix:/run/php/php8.1-fpm.sock;
# # With php-cgi (or other tcp sockets):
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
listen [::]:443 ssl ipv6only=on; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/www.lisky.site/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/www.lisky.site/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.lisky.site) {
return 301 https://$host$request_uri;
} # managed by Certbot
if ($host = lisky.site) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80 default_server;
listen [::]:80 default_server;
server_name lisky.site www.lisky.site;
return 404; # managed by Certbot
Что предпринять в таком случае, и где я накосячил?