I’ve just stumbled across Caddy having failed to set up IIS ARR Reverse Proxy to achieve what I need.
Specifically, I have a single public static IP address which points to my home lab server.
It’s currently running a few virtual servers, with the following being the ones I may be able to use Caddy with.
192.168.1.3 - Exchange Server and IIS Web Sites
192.168.1.6 - Web Server (or at least I’d like it to be!).
The problem that I’m having is that owing to the fact I only have one static IP address, all traffic from 80 and 443 is being port forwarded from my ISP router to 192.168.1.3 (Exchange Server and IIS Web Sites).
I’m also using WinACME to generate SSL certs for IIS Sites and Exchange (Although the Exchange one does require manual interaction every time it renews).
I’d like to separate the IIS web sites from the Exchange Server and put them on 192.168.1.6 (Web Server) whilst maintaining the Exchange Server on it’s current IP address.
So my questions are,
Can I do this with Caddy?
Will this mean that the SSL certs are no longer needed on the Exchange/IIS VM’s as I’d guess they would be managed by Caddy?
Are there any sample caddyfiles around that I can modify to suit my needs (Exchange/Web/SSL) and also learn from?
My intent would be to spin up another Windows Server 2016 VM on 192.168.1.7 which Caddy would be installed to as the Reverse Proxy.
Port forward 80 and 443 from the ISP router to 192.168.1.7, then let Caddy take care of sending the Exchange traffic to 192.168.1.3 and the web traffic to 192.168.1.6.
I’m using Windows Server 2016 as the host for Caddy, which is on IP 192.168.1.7, I’ve port forwarded 80 and 443 to this IP (I’ve also disabled Windows firewall on 192.168.1.6 and 7 whilst testing.
I’m executing Caddy by double clicking, it launches as expected and seems to hang with the following message: activating privacy features.
I think this might be to do with LetsEncrypt as I think I’ve exhausted certificate request attempts, so I removed the first 3 proxy / 192.168.1.6 entries and just left the autodiscover ones in, it did appear to request the certificates, but then terminates back to Windows, I guess this is not expected behaviour?
It’s Caddy for Windows 1.0.4, which I assume is the latest version as it was only downloaded yesterday.
Caddy should block when it’s serving (i.e. the window should stay indefinitely).
You probably want to run it from the command line instead of double clicking - this means that when it exits, the window will remain open and you can read the output. The output will be critical to determining why Caddy’s exiting.
My guess is that if you’re seeing it request multiple certificates but then fail out, maybe one of the later sites is not configured properly (in terms of DNS, if this is the case).