Nginx – Do I need to have an SSL certificate installed on the server to redirect from 443 to 80

nginx

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?

Best Answer

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.

Related Topic