Inside my LAN (on a different machine 192.168.1.20) I want to add another server (BigBlueButton.org) that is using nginx, There are some processes on the BigBlueButton server that only listen on 127.0.0.1 and rely on nginx to route incoming calls.
For this to work I do need configure Caddy as if it were only a firewall and have it forward incoming request from my external hostname to the BigBlueButton server
Is this possible? COuld you give me the how to/instructions?
I don’t find the question very clear, but I think what you’re trying to do is to make Caddy handle requests to a different domain name to your other server? If so, all you need to do is add another site block to your Caddyfile.
In this case, your other domain name’s DNS would point to the same IP address as your duckdns domain; you can use CNAME to point your other domain to your duckdns domain, so that your other domain doesn’t also need a dynamic IP.
Sorry if I misunderstood what you’re asking, if so it would be best if you could give as much detail as you can to help us understand what you’re trying to achieve.
I succesfully installed Rocketchat server on a Ubuntu server 18.04 VM with DOCKER and NGINX in my home LAN and works great. So I know the installation is fine.
But now I need to fix the installation according my home LAN specifications that has other 2 servers.
Basically my situation is as below
Internet ===> Router port 443 ===> Caddy proxy server ====> http://server1
====> (wish to do this but is not working ) rhttp://ocket.chat server
Basically my Caddy Proxy server forwards all encrypted communication to the appropriate server inside my LAN
In order to make ROCKETCHAT work in my environment, I think I have 2 option
a) make all internat communication of RocketChat unencrypted but I guess will not work
b) make Caddy passthorught all the communications towards the ROCKETCHAT server https://rocketchat-klagio.duckdns.org =====> direct to rockechat server inside LAN (https)
c) othe rsolutions?
https://server1-klagio.duckdns.org ====> ======> http://server1
Caddy proxy server
https://server2-klagio.duckdns.org ====> =====> http://server2
https://rocket-chat-klagio.duckdns.org. bypass Caddy directly to https://192.168.1.13 internal IP of RocketChat (it has Nginx)
Hey thanks a lot. I can definetely try that. On my (already done) installation of rocket chat I will just have to disable the nginx service, modify my Caddy settings, and that’s it, correct?
On another program (BigBlkueButton) the settings Caddy ==> BBB server without Nginx, was not working, because those servers have a lot of services (voice, video, screen sharing, chat, and so on), and some of those services were relying on local Nginx.
But nevertheless I will try your solution, perhaps this works with rochechat and its jitsi integration (actually what I am interested primarily is VOICE and VIDEO self hosted solution)
I see the ssi on; option in the first block, there’s no equivalent to that in Caddy. Hopefully that isn’t required. SSI is “Server Side Includes”, I’ve never used it but it seems to read the response from the service, look for HTML comment blocks, and include other HTML content inline to replace that comment.
There’s also no tcp_nodelay equivalent option, but I think using websocket for that block should be enough. I hope.
Yeah, the templates feature is great if you’re building your own site from scratch, but if you’re proxying to another app that you don’t control, it won’t help here. It’s a similar feature, but the syntax is different, therefore they’re incompatible.
@matt was just saying that the template directive now implements a sub-requests feature, not that it supports SSI.
Hmm. This is where things become hard to debug. That essentially means that Caddy tried to make a request to the proxy backend, but something went wrong.
Make sure the IP addresses in there are correct, I just typed up that Caddyfile example in a hurry, and I also don’t know what your network looks like, was just taking guesses based on your earlier comments.
When I disable CADDY, and forward my port 443 to the JITSI-MEET server, everything works: I mean JITSI-SERVER NGINX installation is final.
When I switch to CADDY as per above configuration, beside forwarding 443 to CADDY (and not anymore to JITSI-MEET) do I have to do something at the JITSI_MEET installation in regards of its NGINX install?
Ok, thanks added that. I can connect, so thats an improvement, but the audio/video is not working and I keep being disconnected from the server. I know this is related to trhe server, but the problem lies in Caddy somewhere. This is the console of the Browser, that shows the error 404