Page 1 of 1

Apache reverse proxy

Published: August 18, 2022 - 11:38
by pedrolito1313
Hello everyone,

We are currently testing WAPT in our company and I must say I am pleasantly surprised by the quality of this tool, which will greatly simplify our lives!

However, I have a question regarding publishing the WAPT server on the internet.
We have several Apache2 reverse proxies, and we have configured one to redirect external connections to the WAPT server. This works well except that the computers are marked as "Disconnected."
This is not the case when connecting from our LAN.

I read that this is due to WebSockets, so I tried several configurations on the Apache reverse proxy, but unfortunately without success. Here is what I have tried.

Test 1
RewriteEngine On
RewriteCond %{HTTP:Upgrade} =websocket [NC]
RewriteRule /(.*) ws://srv-wapt.domain.local:80/$1 [P,L]
RewriteCond %{HTTP:Upgrade} !=websocket [NC]
RewriteRule /(.*) http://srv-wapt.domain.local:80/$1 [P,L]


Test 2
ProxyPass / http://srv-wapt.domain.local:80/
RewriteEngine on
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteCond %{HTTP:Connection} upgrade [NC]
RewriteRule ^/?(.*) "ws://srv-wapt.domain.local:80/$1" [P,L]


Thanks in advance
Have a great day

Re: Apache Reverse Proxy

Published: August 22, 2022 - 4:26 PM
by dcardon
Managing WebSockets and client certificate authentication is complex enough without adding more. It's not impossible to get it working behind an Apache reverse proxy, but it's far from trivial, and it's likely to break with every update if the communication between the agent and the server changes...

Regards,

Denis