Skip to content
Discussion options

You must be logged in to vote

The client isn't guessing that URL — it's reading it from your config. nats_info.nats_ws_urls in config.yaml is sent to the browser and used verbatim for the WebSocket connection. So wss://meet.knnia.com:8226/ means that's literally what's in your config right now. No amount of Apache tuning will change it.

Since Apache already terminates TLS on 443, don't expose the NATS port at all. Point the client at a path on your normal domain and let Apache proxy it.

config.yaml:

nats_info:
  nats_urls:
    - "nats://host.docker.internal:4222"
  nats_ws_urls:
    - "wss://meet.knnia.com/nats"

Keep NATS itself plain, since Apache is doing the TLS. In nats_server.conf:

websocket {
    port: 8222
    …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@leoncenteno
Comment options

Answer selected by leoncenteno
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants