1 |
jpp |
1.1 |
diff -Nur smeserver-nextcloud-1.1.0.old/root/etc/e-smith/events/actions/nextcloud-occ-conf smeserver-nextcloud-1.1.0/root/etc/e-smith/events/actions/nextcloud-occ-conf |
2 |
|
|
--- smeserver-nextcloud-1.1.0.old/root/etc/e-smith/events/actions/nextcloud-occ-conf 2020-11-08 11:52:18.783000000 -0500 |
3 |
|
|
+++ smeserver-nextcloud-1.1.0/root/etc/e-smith/events/actions/nextcloud-occ-conf 2020-11-08 14:03:55.927000000 -0500 |
4 |
|
|
@@ -103,6 +103,8 @@ |
5 |
|
|
OCC "config:system:set trusted_domains $i --value=".$_; |
6 |
|
|
$i++; |
7 |
|
|
} |
8 |
|
|
+my $CloudDomain = $cdb->get_prop('nextcloud','TrustedDomains') || ''; |
9 |
|
|
+OCC "config:system:set trusted_domains 99 --value=$CloudDomain" unless $CloudDomain eq ""; |
10 |
|
|
|
11 |
|
|
# enable files_external |
12 |
|
|
OCC "app:enable files_external"; |
13 |
|
|
diff -Nur smeserver-nextcloud-1.1.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/98nextcloud smeserver-nextcloud-1.1.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/98nextcloud |
14 |
|
|
--- smeserver-nextcloud-1.1.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/98nextcloud 2020-11-08 11:52:18.812000000 -0500 |
15 |
|
|
+++ smeserver-nextcloud-1.1.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/98nextcloud 2020-11-08 14:00:15.267000000 -0500 |
16 |
|
|
@@ -2,9 +2,14 @@ |
17 |
|
|
my $access = $nextcloud{'access'} || 'private'; |
18 |
|
|
my $allow = ($access eq 'public')?'all':"$localAccess $externalSSLAccess"; |
19 |
|
|
my $authtype = $nextcloud{'Authentication'} || 'none'; |
20 |
|
|
+my $CloudDomain = $nextcloud{'CloudDomain'} || 'none'; |
21 |
|
|
|
22 |
|
|
my $alias = (($nextcloud{'AliasOnPrimary'} || 'enabled') eq 'enabled') ? |
23 |
|
|
'Alias /nextcloud /usr/share/nextcloud' : ''; |
24 |
|
|
+$alias .= "\nAlias /.well-known/acme-challenge/ /home/e-smith/files/ibays/Primary/html/.well-known/acme-challenge/" unless $CloudDomain eq 'none'; |
25 |
|
|
+ |
26 |
|
|
+my $redirectif = ""; |
27 |
|
|
+$redirectif = 'RewriteCond "%\{HTTP_HOST\}" "!^'. (quotemeta $CloudDomain) .'" [NC]' unless $CloudDomain eq 'none'; |
28 |
|
|
|
29 |
|
|
my $maxupload = $nextcloud{'MaxUploadSize'} || '1024'; |
30 |
|
|
my $maxpost = $maxupload+1; |
31 |
|
|
@@ -88,9 +93,10 @@ |
32 |
|
|
|
33 |
|
|
$config |
34 |
|
|
|
35 |
|
|
-Redirect 301 /.well-known/carddav /nextcloud/remote.php/dav |
36 |
|
|
-Redirect 301 /.well-known/caldav /nextcloud/remote.php/dav |
37 |
|
|
- |
38 |
|
|
+$redirectif |
39 |
|
|
+RewriteRule /.well-known/carddav/(.+) /nextcloud/remote.php/dav/\$1 [R=301,L] |
40 |
|
|
+$redirectif |
41 |
|
|
+RewriteRule /.well-known/caldav/(.+) /nextcloud/remote.php/dav/\$1 [R=301,L] |
42 |
|
|
|
43 |
|
|
END |
44 |
|
|
} |