Anonymous user
Caddy: Difference between revisions
Add example to configure redirect
imported>Onny mNo edit summary |
imported>Onny (Add example to configure redirect) |
||
Line 16: | Line 16: | ||
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. | ||
=== Redirect === | |||
<syntaxhighlight lang="nix> | |||
caddy.virtualHosts."example.org".extraConfig = '' | |||
redir https://www.example.org | |||
''; | |||
</syntaxhiglight> | |||
[[Category:Applications]] | [[Category:Applications]] | ||
[[Category:Web Servers]] | [[Category:Web Servers]] |