Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
include /etc/nginx/snippets/letsencrypt.conf;
in
server {
listen 443 ssl http2;
...
}
add
Answer found! Sometimes they write this construction in articles on installing a certificate on nginx:
server {
listen 80;
listen[::]:80 ipv6only=on;
server_name oxozle.com;
include /etc/nginx/snippets/letsencrypt.conf;
return 301 https://$host$request_uri;
}
in this case, the certificate will not be updated, due to the instant redirect,
so you need to specify the location of the redirect "/", and not when initializing the server.
server {
listen 80;
listen[::]:80 ipv6only=on;
server_name oxozle.com;
include /etc/nginx/snippets/letsencrypt.conf;
location /{
return 301 https://$host$request_uri;
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question