Apache reverse proxy
Published: August 18, 2022 - 11:38
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
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