Commit 403cc12
nixos/nextcloud: update / clean up the nginx configuration
First of all, a few cleanups were made to make it more readable:
* Reordered the sections by their priority so what you're reading in Nix
is also what you get in the final nginx.conf.
* Unified media/asset locations
Most notably, this fixes the
Your web server is not properly set up to resolve "/ocm-provider/".
warning since 27.1.2 where `ocm-provider` was moved from a static
directory in the source tarball to a dynamic HTTP route[1].
Additionally, the following things were fixed:
* The 404 checks for build/tests/etc. are now guaranteed to be before
the `.php` location match and it's not implicitly relied upon Nix's
internal attribute sorting anymore.
* `.wasm` files are supported properly and a correct `Content-Type` is
set.
* For "legacy" routes (e.g. `ocs-provider`/`cron`/etc) a `rewrite` rule
inside the location for fastcgi is used as recommended by upstream[2].
This also makes it easier to understand the purpose of the location
itself (i.e. use fastcgi for PHP code).
[1] nextcloud/documentation#11179
[2] https://docs.nextcloud.com/server/27/admin_manual/installation/nginx.html1 parent 6b57e8e commit 403cc12
1 file changed
Lines changed: 35 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
63 | 66 | | |
64 | 67 | | |
65 | 68 | | |
| |||
1080 | 1083 | | |
1081 | 1084 | | |
1082 | 1085 | | |
1083 | | - | |
1084 | | - | |
1085 | | - | |
1086 | | - | |
1087 | 1086 | | |
1088 | 1087 | | |
1089 | 1088 | | |
| |||
1108 | 1107 | | |
1109 | 1108 | | |
1110 | 1109 | | |
1111 | | - | |
1112 | | - | |
1113 | | - | |
1114 | | - | |
1115 | | - | |
1116 | | - | |
1117 | | - | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
1118 | 1123 | | |
1119 | 1124 | | |
| 1125 | + | |
| 1126 | + | |
1120 | 1127 | | |
1121 | 1128 | | |
1122 | 1129 | | |
| |||
1132 | 1139 | | |
1133 | 1140 | | |
1134 | 1141 | | |
1135 | | - | |
| 1142 | + | |
1136 | 1143 | | |
1137 | 1144 | | |
1138 | 1145 | | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
1139 | 1149 | | |
1140 | | - | |
| 1150 | + | |
1141 | 1151 | | |
1142 | 1152 | | |
1143 | 1153 | | |
1144 | | - | |
1145 | | - | |
1146 | | - | |
1147 | | - | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
1148 | 1166 | | |
1149 | 1167 | | |
1150 | 1168 | | |
| |||
0 commit comments