mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-29 17:10:48 +00:00
nixos/dokuwiki: fix https redirect
Even if the webserver had https disabled, the user would still get redirected to an https url when attemting to login.
This commit is contained in:
parent
9dab2f2de2
commit
f7b6bfd113
|
@ -321,7 +321,7 @@ in
|
|||
enable = true;
|
||||
virtualHosts = mapAttrs (hostName: cfg: mkMerge [ cfg.nginx {
|
||||
root = mkForce "${pkg hostName cfg}/share/dokuwiki";
|
||||
extraConfig = "fastcgi_param HTTPS on;";
|
||||
extraConfig = lib.optionalString (cfg.nginx.addSSL || cfg.nginx.forceSSL || cfg.nginx.onlySSL || cfg.nginx.enableACME) "fastcgi_param HTTPS on;";
|
||||
|
||||
locations."~ /(conf/|bin/|inc/|install.php)" = {
|
||||
extraConfig = "deny all;";
|
||||
|
@ -359,7 +359,7 @@ in
|
|||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param REDIRECT_STATUS 200;
|
||||
fastcgi_pass unix:${config.services.phpfpm.pools."dokuwiki-${hostName}".socket};
|
||||
fastcgi_param HTTPS on;
|
||||
${lib.optionalString (cfg.nginx.addSSL || cfg.nginx.forceSSL || cfg.nginx.onlySSL || cfg.nginx.enableACME) "fastcgi_param HTTPS on;"}
|
||||
'';
|
||||
};
|
||||
}]) eachSite;
|
||||
|
|
Loading…
Reference in a new issue