diff -Nur --no-dereference smeserver-collabora-0.1.6.old/root/etc/e-smith/events/actions/smeserver-collabora-conf smeserver-collabora-0.1.6/root/etc/e-smith/events/actions/smeserver-collabora-conf
--- smeserver-collabora-0.1.6.old/root/etc/e-smith/events/actions/smeserver-collabora-conf 2022-03-09 22:06:16.000000000 -0500
+++ smeserver-collabora-0.1.6/root/etc/e-smith/events/actions/smeserver-collabora-conf 2022-03-22 23:13:19.127000000 -0400
@@ -13,9 +13,10 @@
#Nextcloud virtualhost
if [[ -n `/sbin/e-smith/config getprop nextcloud VirtualHost` ]];then AllowWopiHosts+="|`/sbin/e-smith/config getprop nextcloud VirtualHost`";fi
+if [[ -n `/sbin/e-smith/config getprop nextcloud CloudDomain` ]];then AllowWopiHosts+="|`/sbin/e-smith/config getprop nextcloud CloudDomain`";fi
#Additional external host
-if [[ -n `/sbin/e-smith/config getprop coolwsd AllowWopiHost` ]];then AllowWopiHosts+="|`/sbin/e-smith/config getprop coolwsd AllowWopiHost`";fi
+if [[ -n `/sbin/e-smith/config getprop coolwsd AllowWopiHost` ]];then AllowWopiHosts+="|`/sbin/e-smith/config getprop coolwsd AllowWopiHost |sed -e 's/,/|/g' `";fi
coolconfig set storage.wopi.host "$AllowWopiHosts"
@@ -30,6 +31,8 @@
/usr/bin/occ config:app:set richdocuments wopi_url --value=https://`/sbin/e-smith/config getprop coolwsd VirtualHost`
/usr/bin/occ app:enable richdocuments
+
+ /usr/bin/occ config:system:set allow_local_remote_servers --value true --type bool
fi
fi
diff -Nur --no-dereference smeserver-collabora-0.1.6.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/80VirtualHostsCollabora smeserver-collabora-0.1.6/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/80VirtualHostsCollabora
--- smeserver-collabora-0.1.6.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/80VirtualHostsCollabora 2022-03-22 23:02:42.877000000 -0400
+++ smeserver-collabora-0.1.6/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/80VirtualHostsCollabora 1969-12-31 19:00:00.000000000 -0500
@@ -1,47 +0,0 @@
-{
- my $domain = $coolwsd{'VirtualHost'} || '';
-
- if ($domain ne '') {
- $OUT .= "\n";
-
- $OUT .= " Options -Indexes\n";
-
- $OUT .= " ServerName $domain\n";
-
- $OUT .= " SSLEngine on\n";
-
- $OUT .= " # Encoded slashes need to be allowed\n";
- $OUT .= " AllowEncodedSlashes NoDecode\n";
-
- $OUT .= " # keep the host\n";
- $OUT .= " ProxyPreserveHost On\n";
-
- $OUT .= " # static html, js, images, etc. served from coolwsd\n";
- $OUT .= " # browser is the client part of LibreOffice Online\n";
- $OUT .= " ProxyPass /browser http://127.0.0.1:9980/browser retry=0\n";
- $OUT .= " ProxyPassReverse /browser http://127.0.0.1:9980/browser\n";
-
- $OUT .= " # WOPI discovery URL\n";
- $OUT .= " ProxyPass /hosting/discovery http://127.0.0.1:9980/hosting/discovery retry=0\n";
- $OUT .= " ProxyPassReverse /hosting/discovery http://127.0.0.1:9980/hosting/discovery\n";
-
- $OUT .= " # Main websocket\n";
- $OUT .= " ProxyPassMatch \"/cool/(.*)/ws\$\" ws://127.0.0.1:9980/cool/\$1/ws nocanon\n";
-
- $OUT .= " # Admin Console websocket\n";
- $OUT .= " ProxyPass /cool/adminws ws://127.0.0.1:9980/cool/adminws\n";
-
- $OUT .= " # Download as, Fullscreen presentation and Image upload operations\n";
- $OUT .= " ProxyPass /cool http://127.0.0.1:9980/cool\n";
- $OUT .= " ProxyPassReverse /cool http://127.0.0.1:9980/cool\n";
-
- $OUT .= " # Compatibility with integrations that use the /lool/convert-to endpoint\n";
- $OUT .= " ProxyPass /lool http://127.0.0.1:9980/cool\n";
- $OUT .= " ProxyPassReverse /lool http://127.0.0.1:9980/cool\n";
-
- $OUT .= " # Endpoint with information about availability of various features\n";
- $OUT .= " ProxyPass /hosting/capabilities http://127.0.0.1:9980/hosting/capabilities retry=0\n";
- $OUT .= " ProxyPassReverse /hosting/capabilities http://127.0.0.1:9980/hosting/capabilities\n";
- $OUT .= "\n";
- }
-}
diff -Nur --no-dereference smeserver-collabora-0.1.6.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/Collabora/00Setup smeserver-collabora-0.1.6/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/Collabora/00Setup
--- smeserver-collabora-0.1.6.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/Collabora/00Setup 1969-12-31 19:00:00.000000000 -0500
+++ smeserver-collabora-0.1.6/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/Collabora/00Setup 2022-03-22 23:05:15.211000000 -0400
@@ -0,0 +1,10 @@
+{
+ use esmith::DomainsDB;
+ # Convert the passed hash for the domain object back into an object.
+ $domain = bless \%domain, 'esmith::DB::db::Record';
+
+ # Make scalars from some of the properties of the domain
+ $virtualHost = $domain->key;
+ $virtualHostContent = $domain->prop('Content');
+ $OUT = "";
+}
diff -Nur --no-dereference smeserver-collabora-0.1.6.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/Collabora/80VirtualHostsCollabora smeserver-collabora-0.1.6/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/Collabora/80VirtualHostsCollabora
--- smeserver-collabora-0.1.6.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/Collabora/80VirtualHostsCollabora 1969-12-31 19:00:00.000000000 -0500
+++ smeserver-collabora-0.1.6/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/Collabora/80VirtualHostsCollabora 2022-03-22 23:19:21.261000000 -0400
@@ -0,0 +1,64 @@
+{
+ my $domain = $coolwsd{'VirtualHost'} || '';
+
+ if ($domain ne '') {
+ if (($port eq "80") ){
+
+ $OUT .= " ServerName $domain\n";
+ $OUT .= " Redirect permanent / https://$domain/ \n";
+ $OUT .= "\n";
+ }
+ else {
+
+ $OUT .= " Options -Indexes\n";
+
+ $OUT .= " ServerName $domain\n";
+
+ $OUT .= " SSLEngine on\n";
+
+ $OUT .= " # Encoded slashes need to be allowed\n";
+ $OUT .= " AllowEncodedSlashes NoDecode\n";
+
+ $OUT .= " # keep the host\n";
+ $OUT .= " ProxyPreserveHost On\n";
+
+ $OUT .= " # static html, js, images, etc. served from loolwsd\n";
+ $OUT .= " # loleaflet is the client part of LibreOffice Online\n";
+ $OUT .= " ProxyPass /loleaflet http://127.0.0.1:9980/loleaflet retry=0\n";
+ $OUT .= " ProxyPassReverse /loleaflet http://127.0.0.1:9980/loleaflet\n";
+
+ $OUT .= " # static html, js, images, etc. served from coolwsd\n";
+ $OUT .= " # browser is the client part of LibreOffice Online\n";
+ $OUT .= " ProxyPass /browser http://127.0.0.1:9980/browser retry=0\n";
+ $OUT .= " ProxyPassReverse /browser http://127.0.0.1:9980/browser\n";
+
+ $OUT .= " # WOPI discovery URL\n";
+ $OUT .= " ProxyPass /hosting/discovery http://127.0.0.1:9980/hosting/discovery retry=0\n";
+ $OUT .= " ProxyPassReverse /hosting/discovery http://127.0.0.1:9980/hosting/discovery\n";
+
+ $OUT .= " # Main websocket\n";
+ $OUT .= " ProxyPassMatch \"/cool/(.*)/ws\$\" ws://127.0.0.1:9980/cool/\$1/ws nocanon\n";
+
+ $OUT .= " # Admin Console websocket\n";
+ $OUT .= " ProxyPass /cool/adminws ws://127.0.0.1:9980/cool/adminws\n";
+
+ $OUT .= " # Download as, Fullscreen presentation and Image upload operations\n";
+ $OUT .= " ProxyPass /cool http://127.0.0.1:9980/cool\n";
+ $OUT .= " ProxyPassReverse /cool http://127.0.0.1:9980/cool\n";
+
+ $OUT .= " # Compatibility with integrations that use the /lool/convert-to endpoint\n";
+ $OUT .= " ProxyPass /lool http://127.0.0.1:9980/cool\n";
+ $OUT .= " ProxyPassReverse /lool http://127.0.0.1:9980/cool\n";
+
+ $OUT .= " # Endpoint with information about availability of various features\n";
+ $OUT .= " ProxyPass /hosting/capabilities http://127.0.0.1:9980/hosting/capabilities retry=0\n";
+ $OUT .= " ProxyPassReverse /hosting/capabilities http://127.0.0.1:9980/hosting/capabilities\n";
+
+
+ $OUT .= " # base\n";
+ $OUT .= " ProxyPass / http://127.0.0.1:9980/ retry=0\n";
+ $OUT .= " ProxyPassReverse / http://127.0.0.1:9980/\n";
+
+ }
+ }
+}
diff -Nur --no-dereference smeserver-collabora-0.1.6.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/Collabora/template-begin smeserver-collabora-0.1.6/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/Collabora/template-begin
--- smeserver-collabora-0.1.6.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/Collabora/template-begin 1969-12-31 19:00:00.000000000 -0500
+++ smeserver-collabora-0.1.6/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/Collabora/template-begin 2022-03-22 23:05:15.396000000 -0400
@@ -0,0 +1,2 @@
+
+
diff -Nur --no-dereference smeserver-collabora-0.1.6.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/Collabora/template-end smeserver-collabora-0.1.6/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/Collabora/template-end
--- smeserver-collabora-0.1.6.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/Collabora/template-end 1969-12-31 19:00:00.000000000 -0500
+++ smeserver-collabora-0.1.6/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/Collabora/template-end 2022-03-22 23:05:15.498000000 -0400
@@ -0,0 +1,2 @@
+
+