If you have needs beyond what Caddy offers, you setup a reverse proxy to Nginx. Let’s look at an example where you would use Nginx for caching. I also added a separate block, in case you want to pass reverse proxy it back to Caddy again.
You may wonder, wouldn’t it be simpler to just run Nginx in that case? Maybe, maybe not. It all depends on your needs.
In the example below I have a WordPress configuration where you could easily switch between passing the request to Nginx and passing it straight to PHP. You would simply change with_nginx
to without_nginx
. It also shows how you could support for purging URLs for the nginx cache, without exposing the purge URLs beyond access for localhost.
Here are some other posts you may like
Electric power companies, in general, are pretty much the same. Tibber however, is unlike any electricity company I had seen before. They try to utilise the data we get from smart devices, which they also sell, to save electricity, money and the environment, as well as improving comfort. It’s a…
I wanted to monitor the power usage of our water heater. However, because it draws 3000W, there weren't a ton of options for what smart plug to use that supported both the needed wattage, zigbee and power monitoring. I ended up buying an ELKO SmartPlug 16A Zigbee plug. Since there…
Last night Digital Ocean launched Managed Databases, a service I have been looking forward to. For now it's only available for PostgreSQL (which I hardly ever use) but MySQL support is just around the corner. I've taken a look at what the service offers and here are some of my…