Getting SSL errors with nginx

ben432rew asked:

I’ve got a digitalocean droplet up and running, and the ip on my dashboard, and with nano /etc/nginx/sites-available/hello_world I have this config file:

server {
  listen 80;

  location / {
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

  location /static/ {
    alias /root/dev/hello_world/staticfiles/;

When I got to in my browser, I get this ssl_error_rx_record_too_long in Firefox, and ERR_SSL_PROTOCOL_ERROR in Chrome.

This happens whether I have gunicorn running or not gunicorn hello_world.wsgi --bind

Why am I getting this error, and what can I do to fix it? Thanks in advance for your patience.

My answer:

You get an SSL protocol error because nginx is only serving HTTP on port 80, not HTTPS. But you mistyped https at the beginning of your URL.

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.