M
M
Maxim Alyukov2020-06-27 19:23:54
Nginx
Maxim Alyukov, 2020-06-27 19:23:54

Why does the redirect from http to https not work?

vvvv

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
ky0, 2020-06-27
@ky0

You have some completely extra if in the http block.

server {
    listen 80;
    server_name rockgame.ru;

        location /.well-known/acme-challenge {
                root /var/www/letsencrypt;
        }

        location / {
                return 301 https://$server_name$request_uri;;
        }
}

This is how the config for working with Certbot looks like.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question