mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 03:17:13 +00:00
nixos/dokuwiki: Don't force http with Caddy
Caddy usually expects just a hostname without scheme to do its automatic HTTPS. It is possible to get the old behavior (only HTTP) by setting `services.caddy.virtualHosts.<host>.hostName`.
This commit is contained in:
parent
a5ca609b8e
commit
1475f480d5
|
@ -475,7 +475,7 @@ in
|
|||
services.caddy = {
|
||||
enable = true;
|
||||
virtualHosts = mapAttrs' (hostName: cfg: (
|
||||
nameValuePair "http://${hostName}" {
|
||||
nameValuePair hostName {
|
||||
extraConfig = ''
|
||||
root * ${pkg hostName cfg}/share/dokuwiki
|
||||
file_server
|
||||
|
|
|
@ -78,6 +78,11 @@ let
|
|||
};
|
||||
};
|
||||
|
||||
services.caddy.virtualHosts = {
|
||||
"site1.local".hostName = "http://site1.local";
|
||||
"site2.local".hostName = "http://site2.local";
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 80 ];
|
||||
networking.hosts."127.0.0.1" = [ "site1.local" "site2.local" ];
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue