Skip to content

Commit

Permalink
nixos/nextcloud: fix nginx-config for Nextcloud 19 and older
Browse files Browse the repository at this point in the history
It seems as I misconfigured `nginx` for certain cases such as the
`ldap`-plugin[1] in 42f6244. This patch
fixes the `nginx`-config to match the upstream recommendations[2].

Also added a comment to the module to remind myself to ensure that
`nginx` will work with both v19 and v20 as soon as the latter is
released and can be packaged in `nixpkgs`.

Co-authored-by: nivadis <nivadis@users.noreply.github.com>

[1] nextcloud/server#16194 (comment)
[2] https://docs.nextcloud.com/server/19/admin_manual/installation/nginx.html

(cherry picked from commit 8d8871c)
  • Loading branch information
Ma27 committed Oct 4, 2020
1 parent 760c6ec commit adc7650
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nixos/modules/services/web-apps/nextcloud.nix
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ in {
};
"/" = {
priority = 900;
extraConfig = "try_files $uri $uri/ /index.php$request_uri;";
extraConfig = "rewrite ^ /index.php;";
};
"~ ^/store-apps" = {
priority = 201;
Expand All @@ -552,7 +552,7 @@ in {
"~ ^/(?:\\.|autotest|occ|issue|indie|db_|console)".extraConfig = ''
return 404;
'';
"~ \\.php(?:$|/)" = {
"~ ^\\/(?:index|remote|public|cron|core\\/ajax\\/update|status|ocs\\/v[12]|updater\\/.+|oc[ms]-provider\\/.+|.+\\/richdocumentscode\\/proxy)\\.php(?:$|\\/)" = {
priority = 500;
extraConfig = ''
include ${config.services.nginx.package}/conf/fastcgi.conf;
Expand Down

0 comments on commit adc7650

Please sign in to comment.