As a freelancer I offend come in offices where the network blocks the web whatsapp page and I am trying to setup my own private reverse proxy for those situations. So far I have been able to reverse proxy the https page but I am having some trouble with the websocket connection that is embedded in the site. In my Google Chrome browser I am getting a ‘HTTP/1.1 403 Forbidden’ for wss://web.whatsapp.com/ws.I have searched and read a couple of hits on it from google but still can’t get it working.
Some environment information (for security reasons i masked my domainname en certificate serial):
Apache version 2.4.39
Loaded Modules:
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 Conf:
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
Log results 1 page load
Because of possible spam notification i am sharing this with a link
https://www.codepile.net/pile/QDL8k9DR