目录
1.nginx错误日志
2019/07/05 13:16:12 [error] 93333#0: *2597 SSL_do_handshake() failed (SSL: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol) while SSL handshaking to upstream, client: 127.0.0.1, server: , request: "GET / HTTP/1.1", upstream: "https://180.101.49.12:80/", host: "localhost:8001"
2.错误的nginx.conf配置
upstream test8001 {
server www.baidu.com;
}
server {
listen 8001;
location / {
proxy_pass https://test8001;
}
}
3.请求
[root@localhost nginx]# curl localhost:8001/ -i
HTTP/1.1 502 Bad Gateway
Server: openresty/1.11.2.5
Date: Fri, 05 Jul 2019 05:16:12 GMT
Content-Type: text/html
Content-Length: 179
Connection