Closed linliyuan closed 1 year ago
目前采用 win10(设置本地代理) -> whistle(本地) -> nginx(远端) -> nohost(远端),采取的方案参考了 https://github.com/Tencent/nohost/issues/20 与 https://zhuanlan.zhihu.com/p/81880837。 但是抓包查看到访问请求方式有点奇怪,whistle 抓包截图如下:
可以看到写的 Server IP 对应的nginx的服务器,但是访问的网址依然是 www.testaa.com,报错502。查看了nginx日志里没有接收到请求 www.testaa.com 的日志,nohost抓包页面没有请求记录。如果直接导出curl的话,请求的url是www.testaa.com,curl -X GET "http://www.testaa.com/" -H "Host: www.testaa.com"。 想问一下这是配置错误了吗?nginx转发的这种情况要怎么处理呢?
相关设置如下: win10代理设置:127.0.0.1:8899 (本地whistle地址) whistle代理设置:www.testaa.com internal-proxy://nohost.37games.com (本地) 本地host: xxx.xxx.xxx.32 nohost.37games.com (设置通过nginx访问nohost)
或者有部署的一些示例可以提供吗?
可以先检查Nginx配置启用长连接
请问一下,这个跟长连接有什么关系呢?要配置长连接才能够正常运行吗?
目前采用 win10(设置本地代理) -> whistle(本地) -> nginx(远端) -> nohost(远端),采取的方案参考了 https://github.com/Tencent/nohost/issues/20 与 https://zhuanlan.zhihu.com/p/81880837。 但是抓包查看到访问请求方式有点奇怪,whistle 抓包截图如下:
可以看到写的 Server IP 对应的nginx的服务器,但是访问的网址依然是 www.testaa.com,报错502。查看了nginx日志里没有接收到请求 www.testaa.com 的日志,nohost抓包页面没有请求记录。如果直接导出curl的话,请求的url是www.testaa.com,curl -X GET "http://www.testaa.com/" -H "Host: www.testaa.com"。 想问一下这是配置错误了吗?nginx转发的这种情况要怎么处理呢?
相关设置如下: win10代理设置:127.0.0.1:8899 (本地whistle地址) whistle代理设置:www.testaa.com internal-proxy://nohost.37games.com (本地) 本地host: xxx.xxx.xxx.32 nohost.37games.com (设置通过nginx访问nohost)