Answer the question
In order to leave comments, you need to log in
How to make the move from www and without to https?
We transfer all sites to https, there are no special problems.
But with one site I can’t figure out how to do it - the address of the site with www is indicated on the board of the car.
I made the move from www to https in the config in this way
server {
listen 80;
server_name www.sitename.ru;
return 301 https://sitename.ru$request_uri;
}
server {
listen 80;
server_name www.sitename.ru;
return 301 https://sitename.ru$request_uri;
}
server {
listen 80;
listen 443 ssl http2;
server_name sitename.ru;
ssl_certificate /etc/letsencrypt/live/sitename.ru/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/sitename.ru/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/sitename.ru/chain.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
root /var/www/sitename.ru/web;
..............................
server {
listen 80;
server_name www.sitename.ru sitename.ru;
return 301 https://sitename.ru$request_uri;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question