1

I need to temporarily disable HTTPS on our site because I accidentally got rate limited by letsencrypt when renewing the certificate. When I go to the site I get redirected to https, but our cert is still expired so it gives a warning. I can't figure out how to get it to stop redirecting to https.

I've also tried "Delete domain security policies" and clearing HSTS in Chrome for the domain to see if it's just Chrome redirecting me but it still doesn't work.

Here is my current config file after commenting out the SSL stuff. Yes I restarted nginx after changing it. Also I do not have any redirects in other config files.

server {
    listen 80;
    #listen 443 ssl;

    #ssl_certificate /etc/letsencrypt/live/tradervalues.com/fullchain.pem;
    #ssl_certificate_key /etc/letsencrypt/live/tradervalues.com/privkey.pem;

    client_max_body_size 256m;
    client_body_timeout 120s;
    root /var/www/trader-wordpress;
    index index.php;
    server_name tradervalues.com;

    location / {
            try_files $uri $uri/ /index.php?q=$uri&$args;
    }

    location = /favicon.ico {
            log_not_found off;
            access_log off;
            allow all;
    }

    location ~ \.php$ {
            include /etc/nginx/fastcgi_params;
            fastcgi_index index.php;
            fastcgi_pass unix:/run/php/php7.0-fpm.sock;
    }

    location ~ /\.ht {
            deny all;
    }
}

2 Answers 2

0

The browser might be redirecting to https. You can confirm with curl with: curl -i http://example.site.com

Your nginx should also not have port 443 open , "telnet example.site.com 443" should fail. If this is not the case, you might have another configuration file opening that port.

4
  • Well your curl command confirms that the server is redirecting to https, and the telnet command is able to connect. But another thing that is very strange is that this domain is now redirecting to a totally different website on our server. We own this other site but there is no configuration anywhere that should be redirecting to it. Mar 16, 2018 at 16:17
  • 1
    I see you have a "listen 80;" and not "listen 80 default;". Are you SURE you are looking a the correct configuration? Mar 16, 2018 at 16:23
  • Yes, there are multiple sites hosted on this server with their own config files. Mar 16, 2018 at 16:25
  • The problem here is the other sites that were listening to HTTPS port, and one of those is chosen as the default server, which then serves requests for your domain with expired certificate. You should define an empty default server virtual host, which might return 444; for all requests. That will clear up things if such a thing happens in the future. Mar 17, 2018 at 21:30
0

I won't exactly say problem solved, but it turns out I was only rate limited for an hour and not a week. I was able to successfully renew the certificate so this is no longer needed.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .