我将我的 nginx 设置为监听端口 8080 这是我的配置文件,当我使用http例如访问时它可以工作http://myweb.com:8080/api/。
server {
listen 8080;
location / {
proxy_pass http://localhost:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_ssl_server_name on;
}
}
Run Code Online (Sandbox Code Playgroud)
然而,当我尝试使用httpsInsomnia 访问它时,它会返回SSL connect error。当我尝试时 curl https://myweb.com:8080 --verbose
它返回类似这样的内容:
* Trying {myipadress}:8080...
* Connected to myweb.com (ipaddress) port 8080 (#0)
* ALPN: offers h2,http/1.1
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* CAfile: /etc/ssl/certs/ca-certificates.crt
* CApath: none
* OpenSSL/3.0.8: error:0A00010B:SSL routines::wrong version number
* Closing connection 0
curl: (35) OpenSSL/3.0.8: error:0A00010B:SSL routines::wrong version number
Run Code Online (Sandbox Code Playgroud)
我已经配置了两天了,不知道哪里出了问题,有人有类似的问题吗?
| 归档时间: |
|
| 查看次数: |
6289 次 |
| 最近记录: |