2023/10/13 11:35:30 [error] 8676#8676: *1212 SSL_do_handshake() failed (SSL: error:1408F10B:SSL routines:ssl3_get_record:wrong version number) while SSL handshaking to upstream, client: 172.16.3.18, server: jenkins.bitsns.site, request: "GET / HTTP/1.1", upstream: "https://127.0.0.1:8080/", host: "jenkins.bitsns.site"
proxy_pass https://localhost:8080;
https://(는) 잘못되었습니다. http://. 이어야 합니다. 대상 URL이 HTTPS이더라도 프록시 자체는 HTTPS가 아닌 HTTP로 액세스해야 합니다.
error log
2023/10/13 12:05:37 [error] 9685#9685: *1992 open() "/usr/share/nginx/html/login" failed (2: No such file or directory), client: 172.16.3.10, server: jenkins.bitsns.site, request: "GET /login?from=%2F HTTP/1.1", host: "jenkins.bitsns.site", referrer: "https://jenkins.bitsns.site/"
location = / {
proxy_pass http://localhost:8080;
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 $scheme;
}
접속을 /usr/share/nginx/html/login로 하는 이유?
- nginx location을
location = /
이렇게 잡았기 떄문!
== 정확히 / URI에 대한 요청만 처리!그렇기에 = 제거 후 nginx restart!
정말 유익한 정보 감사합니다. 덕분에 해결했어요!