Closed
Description
Description
I can't figure out the correct apache config in order to proxy https and wss requests correctly. My apache config looks something like this:
<VirtualHost *:443>
ServerName code.mydomain.net
ProxyRequests off
ProxyPreserveHost on
AllowEncodedSlashes NoDecode
RequestHeader set X-Forwarded-Proto https
RequestHeader set X-Forwarded-Port 443
ProxyPass / http://code.code:8080/ nocanon
ProxyPassReverse / http://code.code:8080/
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
My problem is now, that this configuration blocks all websocket requests. In order to also proxy websocket connections I would need to add something like this to my apache config:
ProxyPass / ws://code.code:8080/
ProxyPassReverse / http://code.code:8080/
The problem with this is, that this will not work with the same url path like the https proxy statements (https://code.mydomain.net/ and wss://code.mydomain.net/). Usually the websocket connection would be handled by a different path (eg.: wss://code.mydomain.net/websocket/).
So my question is: Is there any way to achieve this with code-server and apache?
Metadata
Metadata
Assignees
Labels
No labels