Why Nostr? What is Njump?
2024-11-01 20:57:10
in reply to

The_Ben on Nostr: If your container opens a port to the outside, then you can use an Nginx proxy to ...

If your container opens a port to the outside, then you can use an Nginx proxy to serve this port from 127.0.0.1 on a domain.

In this example here, a Haven relay is running on port 3355 in a Docker container. The port is exposed to the outside. My Nginx server then serves this port with SSL and a domain.

location / {
proxy_pass http://127.0.0.1:3355;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}

Let me get a full example.....
Author Public Key
npub1pt0kw36ue3w2g4haxq3wgm6a2fhtptmzsjlc2j2vphtcgle72qesgpjyc6