Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. crt.sh | example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.
My domain is: dmssilver6.com
I have enabled ssl in my domain. Here is my config after i ran the certbot command:
server {
server_name dmssilver6.com www.dmssilver6.com;
root /root/silver6-frontend/dist;
location / {
try_files $uri $uri/ =404;
}
listen 465 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/dmssilver6.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/dmssilver6.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.dmssilver6.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
if ($host = dmssilver6.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
return 404; # managed by Certbot
}
server {
if ($host = www.dmssilver6.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
if ($host = dmssilver6.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name dmssilver6.com www.dmssilver6.com;
return 404; # managed by Certbot
}
It says site is not secured and my sites doesnot opens.
Because of that i have removed some part of the code and have used only:
server {
listen 80;
server_name dmssilver6.com www.dmssilver6.com;
root /root/silver6-frontend/dist;
location / {
try_files $uri $uri/ =404;
}
listen 465 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/dmssilver6.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/dmssilver6.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
}
it opens the unsecured (http) site. What's wronng with the config?