错误代码:SSL_ERROR_RX_RECORD_TOO_LONG with NGINX Reverse Proxy, ssl and spring boot
Error code: SSL_ERROR_RX_RECORD_TOO_LONG with NGINX Reverse Proxy, ssl and spring boot
我在服务器上的 Https 无法正常工作并获取 Error code: SSL_ERROR_RX_RECORD_TOO_LONG
。我尝试了太多东西,但无法得到任何结果。
我的带有 Nginx 反向代理的 Http spring 引导服务器工作得很好。
下面是我的 /etc/nginx/conf.d/*.conf 文件:
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
}
并且我检查了我的 443 端口是否打开并正在侦听。
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
我不知道我哪里做错了。任何帮助将不胜感激
抱歉,关于这个问题,现在我知道问题出在哪里了,在 EC2 实例中我没有包含 https 入站规则。 xD
我在服务器上的 Https 无法正常工作并获取 Error code: SSL_ERROR_RX_RECORD_TOO_LONG
。我尝试了太多东西,但无法得到任何结果。
我的带有 Nginx 反向代理的 Http spring 引导服务器工作得很好。
下面是我的 /etc/nginx/conf.d/*.conf 文件:
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
}
并且我检查了我的 443 端口是否打开并正在侦听。
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
我不知道我哪里做错了。任何帮助将不胜感激
抱歉,关于这个问题,现在我知道问题出在哪里了,在 EC2 实例中我没有包含 https 入站规则。 xD