S
S
shiroleer2017-05-26 11:10:31
Nginx
shiroleer, 2017-05-26 11:10:31

How to disable https on Nginx?

The site had https enabled, the certificate was signed by Let's Encrypt. Yesterday it expired. I could not update it and decided to turn off https altogether for a while. In the server config, I removed the lines that were responsible for redirecting from http to https and listening on port 443:

listen 80;
    server_name site.ru;
    return 301 https://site.ru$request_uri;
    server_tokens off;

listen 443 ssl;
    server_name site.ru;
    server_tokens off;

    # Указываем пути к сертификатам
    ssl_certificate /etc/letsencrypt/live/site.ru/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/site.ru/privkey.pem;

    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_prefer_server_ciphers on;

    ssl_dhparam /etc/ssl/certs/dhparam.pem;
    ssl_ciphers 'xxx';
    ssl_session_timeout 1d;
    ssl_session_cache shared:SSL:50m;

    ssl_stapling on;
    ssl_stapling_verify on;
    add_header Strict-Transport-Security max-age=15768000;


However, the server both redirected to https and continues to redirect. How to be?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Erelecano Oioraen, 2017-05-26
@Erelecano

> add_header Strict-Transport-Security max-age=15768000;
Who added to the config? Here you have a browser and remember that you need to go to https. Read what is HSTS.

A
Alexey Ukolov, 2017-05-26
@alexey-m-ukolov

add_header Strict-Transport-Security max-age=1;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question