1

I would like to redirect all HTTPS requests to HTTP in my nginx web server. I had through that the following would do it:

server {
       listen 443;
       server_name my.site.com;
       rewrite ^(.*) http://$host$1 permanent;
 }

But anytime I try to hit https://my.site.com I get the following error in my browser:

Unable to make a secure connection to the server. This may be a problem with the server, or it may be requiring a client authentication certificate that you don't have. Error code: ERR_SSL_PROTOCOL_ERROR

I checked the nginx logs and found the following entries:

T="2013-09-27T22:41:05+00:00" IP=108.166.113.99 USR=- RQ="GET / HTTP/1.1" ST=200 BB=6237 MS=0.000 REF="-" UA="python-requests/0.13.6 CPython/2.7.3 Linux/3.2.0-24-virtual"
T="2013-09-27T22:41:05+00:00" IP=108.166.113.99 USR=- RQ="GET / HTTP/1.1" ST=301 BB=184 MS=0.000 REF="-" UA="python-requests/0.13.6 CPython/2.7.3 Linux/3.2.0-24-virtual"
T="2013-09-27T22:41:05+00:00" IP=108.166.113.99 USR=- RQ="GET / HTTP/1.1" ST=200 BB=6237 MS=0.000 REF="-" UA="python-requests/0.13.6 CPython/2.7.3 Linux/3.2.0-24-virtual"
T="2013-09-27T22:41:05+00:00" IP=108.166.113.99 USR=- RQ="GET /sitemap.xml HTTP/1.1" ST=200 BB=3965 MS=0.000 REF="-" UA="python-requests/0.13.6 CPython/2.7.3 Linux/3.2.0-24-virtual"

But have no idea what they mean.... Is it possible that the fact that I don't have any certificates installed on my server could cause the problem? If not, can anyone see what I am doing wrong?

4
  • Admittedly, I don't do much work with web sites, web services or SSL but if you want to redirect HTTPS to HTTP then it follows (in my logic) that you don't want any HTTPS connections to your web site, which then begs the question: Why not unbind port 443 from the web site? Why redirect HTTPS to HTTP at all? Why not just prevent HTTPS connections in the first place?
    – joeqwerty
    Sep 27, 2013 at 23:34
  • Good question. In my situation I am temporarily setting up a "Site under construction" type page while we physically move servers from one location to another. The server I set this up on has no need for SSL certificates, but the normal site does. So if people have bookmarked https://whatever pages it needs to take them to a standard page. Sep 27, 2013 at 23:47
  • OK. Now it makes sense to me. Thanks for the clarification.
    – joeqwerty
    Sep 27, 2013 at 23:48
  • this is a duplicate of stackoverflow.com/questions/3298570/… Is there a reason you cant just load the SSL cert?
    – Matt Bear
    Sep 28, 2013 at 2:49

1 Answer 1

6

Yes, you need a SSL certificate.

The browser expects a certificate as you are connecting using https; unless you'd connect to http://my.site.com:443 instead of https://my.site.com.

You can self-sign it, but that would still give a warning in most (all) browsers before finally redirecting you to the http website.

1
  • how do you provide the certificate to the browser? Jul 25, 2014 at 9:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.