/[smecontribs]/rpms/smeserver-collabora/contribs10/smeserver-collabora-0.1.6-bz11895-Virtualhost.patch
ViewVC logotype

Annotation of /rpms/smeserver-collabora/contribs10/smeserver-collabora-0.1.6-bz11895-Virtualhost.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.3 - (hide annotations) (download)
Wed Mar 23 03:36:26 2022 UTC (2 years, 7 months ago) by jpp
Branch: MAIN
CVS Tags: smeserver-collabora-0_1_6-7_el7_sme, smeserver-collabora-0_1_6-5_el7_sme, smeserver-collabora-0_1_6-6_el7_sme, HEAD
Changes since 1.2: +5 -10 lines
* Tue Mar 22 2022 Jean-Philippe Pialasse <tests@pialasse.com> 0.1.6-5.sme
- make Collabo use a subfolder for its Virtualdomain [SME: 11895]
- and ability to have multiple collabora domains

1 jpp 1.1 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
2     --- smeserver-collabora-0.1.6.old/root/etc/e-smith/events/actions/smeserver-collabora-conf 2022-03-09 22:06:16.000000000 -0500
3     +++ smeserver-collabora-0.1.6/root/etc/e-smith/events/actions/smeserver-collabora-conf 2022-03-22 23:13:19.127000000 -0400
4     @@ -13,9 +13,10 @@
5    
6     #Nextcloud virtualhost
7     if [[ -n `/sbin/e-smith/config getprop nextcloud VirtualHost` ]];then AllowWopiHosts+="|`/sbin/e-smith/config getprop nextcloud VirtualHost`";fi
8     +if [[ -n `/sbin/e-smith/config getprop nextcloud CloudDomain` ]];then AllowWopiHosts+="|`/sbin/e-smith/config getprop nextcloud CloudDomain`";fi
9    
10     #Additional external host
11     -if [[ -n `/sbin/e-smith/config getprop coolwsd AllowWopiHost` ]];then AllowWopiHosts+="|`/sbin/e-smith/config getprop coolwsd AllowWopiHost`";fi
12     +if [[ -n `/sbin/e-smith/config getprop coolwsd AllowWopiHost` ]];then AllowWopiHosts+="|`/sbin/e-smith/config getprop coolwsd AllowWopiHost |sed -e 's/,/|/g' `";fi
13    
14     coolconfig set storage.wopi.host "$AllowWopiHosts"
15    
16     @@ -30,6 +31,8 @@
17     /usr/bin/occ config:app:set richdocuments wopi_url --value=https://`/sbin/e-smith/config getprop coolwsd VirtualHost`
18    
19     /usr/bin/occ app:enable richdocuments
20     +
21     + /usr/bin/occ config:system:set allow_local_remote_servers --value true --type bool
22     fi
23    
24     fi
25     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
26     --- 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
27     +++ smeserver-collabora-0.1.6/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/80VirtualHostsCollabora 1969-12-31 19:00:00.000000000 -0500
28     @@ -1,47 +0,0 @@
29     -{
30     - my $domain = $coolwsd{'VirtualHost'} || '';
31     -
32     - if ($domain ne '') {
33     - $OUT .= "<VirtualHost *:443>\n";
34     -
35     - $OUT .= " Options -Indexes\n";
36     -
37     - $OUT .= " ServerName $domain\n";
38     -
39     - $OUT .= " SSLEngine on\n";
40     -
41     - $OUT .= " # Encoded slashes need to be allowed\n";
42     - $OUT .= " AllowEncodedSlashes NoDecode\n";
43     -
44     - $OUT .= " # keep the host\n";
45     - $OUT .= " ProxyPreserveHost On\n";
46     -
47     - $OUT .= " # static html, js, images, etc. served from coolwsd\n";
48     - $OUT .= " # browser is the client part of LibreOffice Online\n";
49     - $OUT .= " ProxyPass /browser http://127.0.0.1:9980/browser retry=0\n";
50     - $OUT .= " ProxyPassReverse /browser http://127.0.0.1:9980/browser\n";
51     -
52     - $OUT .= " # WOPI discovery URL\n";
53     - $OUT .= " ProxyPass /hosting/discovery http://127.0.0.1:9980/hosting/discovery retry=0\n";
54     - $OUT .= " ProxyPassReverse /hosting/discovery http://127.0.0.1:9980/hosting/discovery\n";
55     -
56     - $OUT .= " # Main websocket\n";
57     - $OUT .= " ProxyPassMatch \"/cool/(.*)/ws\$\" ws://127.0.0.1:9980/cool/\$1/ws nocanon\n";
58     -
59     - $OUT .= " # Admin Console websocket\n";
60     - $OUT .= " ProxyPass /cool/adminws ws://127.0.0.1:9980/cool/adminws\n";
61     -
62     - $OUT .= " # Download as, Fullscreen presentation and Image upload operations\n";
63     - $OUT .= " ProxyPass /cool http://127.0.0.1:9980/cool\n";
64     - $OUT .= " ProxyPassReverse /cool http://127.0.0.1:9980/cool\n";
65     -
66     - $OUT .= " # Compatibility with integrations that use the /lool/convert-to endpoint\n";
67     - $OUT .= " ProxyPass /lool http://127.0.0.1:9980/cool\n";
68     - $OUT .= " ProxyPassReverse /lool http://127.0.0.1:9980/cool\n";
69     -
70     - $OUT .= " # Endpoint with information about availability of various features\n";
71     - $OUT .= " ProxyPass /hosting/capabilities http://127.0.0.1:9980/hosting/capabilities retry=0\n";
72     - $OUT .= " ProxyPassReverse /hosting/capabilities http://127.0.0.1:9980/hosting/capabilities\n";
73     - $OUT .= "</VirtualHost>\n";
74     - }
75     -}
76     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
77     --- 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
78     +++ 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
79     @@ -0,0 +1,10 @@
80     +{
81     + use esmith::DomainsDB;
82     + # Convert the passed hash for the domain object back into an object.
83     + $domain = bless \%domain, 'esmith::DB::db::Record';
84     +
85     + # Make scalars from some of the properties of the domain
86     + $virtualHost = $domain->key;
87     + $virtualHostContent = $domain->prop('Content');
88     + $OUT = "";
89     +}
90     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
91     --- 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
92 jpp 1.3 +++ smeserver-collabora-0.1.6/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/Collabora/80VirtualHostsCollabora 2022-03-22 23:35:16.351000000 -0400
93     @@ -0,0 +1,59 @@
94 jpp 1.1 +{
95     + if (($port eq "80") ){
96     +
97 jpp 1.3 + $OUT .= " ServerName $virtualHost\n";
98     + $OUT .= " Redirect permanent / https://$virtualHost/ \n";
99 jpp 1.1 + $OUT .= "\n";
100     + }
101     + else {
102     +
103     + $OUT .= " Options -Indexes\n";
104     +
105 jpp 1.3 + $OUT .= " ServerName $virtualHost\n";
106 jpp 1.1 +
107     + $OUT .= " SSLEngine on\n";
108     +
109     + $OUT .= " # Encoded slashes need to be allowed\n";
110     + $OUT .= " AllowEncodedSlashes NoDecode\n";
111     +
112     + $OUT .= " # keep the host\n";
113     + $OUT .= " ProxyPreserveHost On\n";
114     +
115     + $OUT .= " # static html, js, images, etc. served from loolwsd\n";
116     + $OUT .= " # loleaflet is the client part of LibreOffice Online\n";
117     + $OUT .= " ProxyPass /loleaflet http://127.0.0.1:9980/loleaflet retry=0\n";
118     + $OUT .= " ProxyPassReverse /loleaflet http://127.0.0.1:9980/loleaflet\n";
119     +
120     + $OUT .= " # static html, js, images, etc. served from coolwsd\n";
121     + $OUT .= " # browser is the client part of LibreOffice Online\n";
122     + $OUT .= " ProxyPass /browser http://127.0.0.1:9980/browser retry=0\n";
123     + $OUT .= " ProxyPassReverse /browser http://127.0.0.1:9980/browser\n";
124     +
125     + $OUT .= " # WOPI discovery URL\n";
126     + $OUT .= " ProxyPass /hosting/discovery http://127.0.0.1:9980/hosting/discovery retry=0\n";
127     + $OUT .= " ProxyPassReverse /hosting/discovery http://127.0.0.1:9980/hosting/discovery\n";
128     +
129     + $OUT .= " # Main websocket\n";
130     + $OUT .= " ProxyPassMatch \"/cool/(.*)/ws\$\" ws://127.0.0.1:9980/cool/\$1/ws nocanon\n";
131     +
132     + $OUT .= " # Admin Console websocket\n";
133     + $OUT .= " ProxyPass /cool/adminws ws://127.0.0.1:9980/cool/adminws\n";
134     +
135     + $OUT .= " # Download as, Fullscreen presentation and Image upload operations\n";
136     + $OUT .= " ProxyPass /cool http://127.0.0.1:9980/cool\n";
137     + $OUT .= " ProxyPassReverse /cool http://127.0.0.1:9980/cool\n";
138     +
139     + $OUT .= " # Compatibility with integrations that use the /lool/convert-to endpoint\n";
140     + $OUT .= " ProxyPass /lool http://127.0.0.1:9980/cool\n";
141     + $OUT .= " ProxyPassReverse /lool http://127.0.0.1:9980/cool\n";
142     +
143     + $OUT .= " # Endpoint with information about availability of various features\n";
144     + $OUT .= " ProxyPass /hosting/capabilities http://127.0.0.1:9980/hosting/capabilities retry=0\n";
145     + $OUT .= " ProxyPassReverse /hosting/capabilities http://127.0.0.1:9980/hosting/capabilities\n";
146     +
147     +
148     + $OUT .= " # base\n";
149     + $OUT .= " ProxyPass / http://127.0.0.1:9980/ retry=0\n";
150     + $OUT .= " ProxyPassReverse / http://127.0.0.1:9980/\n";
151     + }
152     +}
153     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
154     --- 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
155     +++ 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
156     @@ -0,0 +1,2 @@
157     +
158     +<VirtualHost {$ipAddress}:{$port}>
159     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
160     --- 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
161     +++ 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
162     @@ -0,0 +1,2 @@
163     +</VirtualHost>
164     +

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed