0

My Https on the server is not working and getting Error code: SSL_ERROR_RX_RECORD_TOO_LONG . I have tried too many things but unable to get any results. My Http spring boot server with Nginx reverse proxy works pretty fine.

Below is my /etc/nginx/conf.d/*.conf file:

server {

        server_name api.e-yantra.org;
        location / {

             # NGINX will pass all requests to specified location here
             proxy_pass http://localhost:8016/;
             proxy_set_header Host $host;
             proxy_set_header X-Real-IP $remote_addr;
             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
             proxy_set_header X-Forwarded-Proto https;
             proxy_set_header X-Forwarded-Port $server_port;
        }

    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/api.e-yantra.org/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/api.e-yantra.org/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

}
server {
    if ($host = api.e-yantra.org) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


        listen 80;

        server_name api.e-yantra.org;
    return 404; # managed by Certbot


}

And I have checked my 443 port is open and listening.

Starting Nmap 7.60 ( https://nmap.org ) at 2020-03-05 10:07 UTC
Nmap scan report for localhost (127.0.0.1)
Host is up (0.00013s latency).
Not shown: 996 closed ports
PORT     STATE SERVICE
22/tcp   open  ssh
80/tcp   open  http
443/tcp  open  https
5432/tcp open  postgresql

I don't know where I did wrong. Any help would be grateful

Sharad Mishra
  • 177
  • 11

1 Answers1

0

Sorry About the problem, Now i know what the problem was, In EC2 instance I had not included https inbound rule. xD

Sharad Mishra
  • 177
  • 11