nginx报https protocol requires SSL support解决

nginx报https protocol requires SSL support解决

{{ detail.nickname }}

{{ formatTime(detail.create_time) }} 字数 {{ detail.content && detail.content.length }} 阅读 {{ detail.read_num }}

"遇到这个问题,往往都是配置https导致的\n\n```nginx\nlocation /a/b/c {\n    proxy_set_header Upgrade $http_upgrade;\n    proxy_set_header Connection \"upgrade\";\n    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n    proxy_set_header Host $host;\n    proxy_http_version 1.1;\n    proxy_pass https://10.128.34.58:1234;\n}\n```\n\n解决也比较简单,到nginx安装目录,如:`nginx-1.18.0` 配置 `with-http_ssl_module` 依赖模块,然后编译安装\n\n```shell\n# ./configure --prefix=/usr/local/nginx --with-http_ssl_module\n# make & make install\n```\n\n最后重启nginx即可\n\n```shell\n# /usr/local/nginx/sbin/nginx -s reload\n```"
PS:写作不易,如要转裁,请标明转载出处。

如果此篇对您有帮助,可小额赞助,以兹鼓励!