How to Use Caddy as a Reverse Proxy

Caddy is a powerful and user-friendly web server. One of its features is its ability to act as a reverse proxy, seamlessly directing client requests to the appropriate backend servers while offering robust security and performance benefits.

To configure caddy as reverse proxy, add following to Caddyfile


Restart Caddy

In this case, all request for domain will be proxied to backend server IP address on port 443.

tls_insecure_skip_verify is to specify not to validate backend server SSL certificate to allow self signed SSL certificate.

To enable logging

This will save logs in JSON format.

If you need to allow multiple domains, separate them with comma.

To redirect www domain to non-www

Back to Caddy

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *