Есть блок
example.com
server {
listen 80;
listen [::]:80;
server_name example.online;
root /home/example/deploy;
index index.html;
location / {
try_files $uri $uri/ =404;
}
}
server {
listen 80;
listen [::]:80;
server_name www.example.online;
return 301 $scheme://example.online$request_uri;
}
При попытке установить сертификат Летс энкрипт выдает ошибку
Deployed Certificate to VirtualHost /etc/nginx/sites-enabled/example.online for example.online
nginx: [emerg] duplicate listen options for [::]:443 in /etc/nginx/sites-enabled/example.online:14
Rolling back to previous server configuration...
nginx restart failed: