【发布时间】:2020-06-15 07:04:12
【问题描述】:
最近我从使用端口号转移到 apache 代理,现在我收到以下浏览器控制台错误:
VM6:1 GET https://comptonpeslonline.com/proxyPort20005/socket.io/?EIO=3&transport=polling&t=NX 400(错误请求)
VM6:1 POST https://comptonpeslonline.com/proxyPort20005/socket.io/?EIO=3&transport=polling&t=NX400(错误请求)
我的 apache 日志文件充满了这些消息:
[Mon Mar 02 18:25:03.199849 2020] [proxy:error] [pid 28494] (111)Connection denied: AH00957: HTTP: 尝试连接到 127.0.0.1:20005 (localhost) 失败
[Mon Mar 02 18:25:03.199892 2020] [proxy:error] [pid 28494] AH00959: ap_proxy_connect_backend 为 (localhost) 禁用工作器 5 秒
[Mon Mar 02 18:25:03.199898 2020] [proxy_http:error] [pid 28494] [client 71.223.254.40:50269] AH01114:HTTP:无法连接到后端:localhost,referer:https://example.com/proxyPort20005/
--
我确实发现了使用端口和代理之间的一个有趣的区别。使用端口号,当我输入以下内容时:
这些结果在浏览器窗口中返回:
96:0{"sid":"XXXX","upgrades":["websocket"],"pingInterval":25000,"pingTimeout":5000}
但是当我尝试使用代理时:
https://example.com/proxyPort20005/socket.io/?EIO=3&transport=polling
我看到了可疑的结果,与我使用端口号时的结果大不相同:
{"code":1,"message":"会话 ID 未知"}
奇怪的是,除了所有错误消息之外,一切似乎都运行良好。
我的 httpd.conf 是这样配置的:
## 2020-03-02 - tried acquire
## 2020-03-02 - tried disablereuse=on
<Location /proxyPort20005/>
ProxyPass http://localhost:20005/ Keepalive=On retry=5 timeout=600
ProxyPassReverse http://localhost:20005/
</Location>
有人对我下一步可能尝试什么有任何建议吗?
非常感谢大家。
【问题讨论】:
标签: socket.io