Jump to content

Caddy: Difference between revisions

21 bytes added ,  31 July 2022
m
no edit summary
imported>Onny
m (Add note to upstream documentation)
imported>Onny
mNo edit summary
Line 1: Line 1:
[https://caddyserver.com/ Caddy] is a HTTP/2 capable web server with automatic HTTPS.
[https://caddyserver.com/ Caddy] is a HTTP/2 capable web server with automatic HTTPS.


== Configuration examples ==
== Installation ==


The following snippet creates a reverse proxy for the domain <code>example.org</code>, redirecting all requests to <code><nowiki>http://10.25.40.6</nowiki></code>.
The following snippet creates a reverse proxy for the domain <code>example.org</code>, redirecting all requests to <code><nowiki>http://10.25.40.6</nowiki></code>.
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.
== Configuration examples ==


=== Redirect ===
=== Redirect ===
Redirecting <code>example.org</code> to <code>www.example.org</code>
Redirecting <code>example.org</code> to <code>www.example.org</code>
<syntaxhighlight lang="nix>
<syntaxhighlight lang="nix>
Anonymous user