Caddy: Difference between revisions
imported>Onny Initial infos about setting up Caddy |
imported>Onny mNo edit summary |
||
Line 15: | Line 15: | ||
Caddy will automatically try to acquire SSL certificates for the domain. This requires you to configure the DNS records of your domain correctly, which should point to the address of your Caddy server. The [[firewall]] ports <code>80</code> and <code>443</code> needs to be opened. | Caddy will automatically try to acquire SSL certificates for the domain. This requires you to configure the DNS records of your domain correctly, which should point to the address of your Caddy server. The [[firewall]] ports <code>80</code> and <code>443</code> needs to be opened. | ||
[[Category:Applications]] | |||
[[Category:Web Servers]] |
Revision as of 10:37, 20 July 2022
Caddy is a HTTP/2 capable web server with automatic HTTPS.
Configuration examples
The following snippet creates a reverse proxy for the domain example.org
, redirecting all requests to http://10.25.40.6
.
/etc/nixos/configuration.nix
caddy = {
enable = true;
virtualHosts."example.org".extraConfig = ''
reverse_proxy http://10.25.40.6
'';
};
Caddy will automatically try to acquire SSL certificates for the domain. This requires you to configure the DNS records of your domain correctly, which should point to the address of your Caddy server. The firewall ports 80
and 443
needs to be opened.