I make a request to this URL: wss://domain/websockify?port=6801 The port parameter can change dynamically. How could I make ProxyPass to redirect to a dynamic port extracted from the URL?
This is the configuration that works with a predefined port:
ProxyPass /websockify ws://localhost:6801/websockify/
ProxyPassReverse /websockify ws://localhost:6801/websockify/
If I use ProxyPassMatch the apache tells me there is an error:
ProxyPassMatch ^/.*\?port=(.*)$ ws://localhost:$1/websockify/
#ProxyPass Unable to parse URL: ws://localhost:$1/websockify/
I use apache 2.4.10