Hello,
I am trying to reverse proxy using caddy. The web server uses http and websockets.
http to serve a webpage and websockets for data exchange.
I am getting the webpage to load securely but websockets is not working when activating widgets on the webpage. I am new to servers & networking.
I think the problem is I don’t know how to let caddy know the difference between the two protocols. If I place a different endpoint in the caddy file for websockets everything on the webpage disappears ie. test.boulderhill.xyz/foo/*
2. Error messages and/or full log output:
I am not getting any error messages but when i activate an action on via the webpage there is no activity in caddy which will normally give me a response code of 200 when things are good.
I had to open up port 8081 on my router for websocket traffic and change the javascript
in my html file from
Socket = new WebSocket(‘ws://’ + window.location.hostname + ‘:81/’);
to
Socket = new WebSocket(‘wss://’ + window.location.hostname + ‘:8081/’);
The internal url is a microcontroller that interfaces with the physical environment and was
presented to only work over a local network.
I definitely need to learn more about Caddy and how it works.