Jump to content

Caddy: Difference between revisions

58 bytes added ,  8 July 2023
m
Make structure of examples consistent
imported>Montchr
(fix code block formatting resulting in invalid rendered html entities)
imported>Malteneuss
m (Make structure of examples consistent)
Line 30: Line 30:


<syntaxhighlight lang="nix>
<syntaxhighlight lang="nix>
caddy = {
services.caddy = {
   enable = true;
   enable = true;
   virtualHosts."example.org".extraConfig = ''
   virtualHosts."example.org".extraConfig = ''
Line 50: Line 50:


<syntaxhighlight lang="nix>
<syntaxhighlight lang="nix>
caddy = {
services.caddy = {
   enable = true;
   enable = true;
   virtualHosts."example.org".extraConfig = ''
   virtualHosts."example.org".extraConfig = ''
Line 63: Line 63:


<syntaxhighlight lang="nix>
<syntaxhighlight lang="nix>
caddy.virtualHosts."example.org" = {
services.caddy = {
  extraConfig = ''
  enable = true;
    redir https://www.example.org
  virtualHosts."example.org" = {
   '';
    extraConfig = ''
  serverAlias = [ "old.example.org" ];
      redir https://www.example.org
   ' ';
    serverAlias = [ "old.example.org" ];
};
};
</syntaxhighlight>
</syntaxhighlight>
Anonymous user