作为一名自由职业者,我经常在办公室里遇到网络屏蔽 whatsapp 网页的情况,因此我尝试为这种情况设置自己的私人反向代理。到目前为止,我已经能够反向代理 https 页面,但我在网站中嵌入的 websocket 连接方面遇到了一些问题。在我的 Google Chrome 浏览器中,我收到了 wss://web.whatsapp.com/ws 的“HTTP/1.1 403 Forbidden”。我在 Google 上搜索并阅读了一些相关内容,但仍然无法使其正常工作。
一些环境信息(出于安全原因,我屏蔽了我的域名和证书序列):
Apache 版本 2.4.39
已加载模块:
http_module (static), proxy_module (shared), proxy_ajp_module (shared), proxy_balancer_module (shared), proxy_connect_module (shared), proxy_html_module (shared), proxy_http_module (shared), proxy_wstunnel_module (shared), rewrite_module (shared), ssl_module (shared)
Vhost 配置:
SSLProxyEngine on
SSLProxyVerify none
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
SSLProxyCheckPeerExpire off
ServerName sub.mydomain.com
ProxyPass /ws/ ws://web.whatsapp.com/ws/
ProxyPassReverse /ws/ ws://web.whatsapp.com/ws/
ProxyPass / https://web.whatsapp.com/
ProxyPassReverse / https://web.whatsapp.com/
ProxyRequests off
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/mydomain.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/mydomain.com/privkey.pem
ErrorLog /var/log/apache2/sub_mydomain_com_error.log
LogLevel debug
记录结果 1 页加载
Because of possible spam notification i am sharing this with a link
https://www.codepile.net/pile/QDL8k9DR