/[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.2 - (hide annotations) (download)
Wed Mar 23 03:19:55 2022 UTC (2 years, 8 months ago) by jpp
Branch: MAIN
CVS Tags: smeserver-collabora-0_1_6-4_el7_sme
Changes since 1.1: +2 -8 lines
* Tue Mar 22 2022 Jean-Philippe Pialasse <tests@pialasse.com> 0.1.6-4.sme
- make Collabo use a subfolder for its Virtualdomain [SME: 11895]

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.2 +++ 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
93     @@ -0,0 +1,64 @@
94 jpp 1.1 +{
95     + my $domain = $coolwsd{'VirtualHost'} || '';
96     +
97     + if ($domain ne '') {
98     + if (($port eq "80") ){
99     +
100     + $OUT .= " ServerName $domain\n";
101     + $OUT .= " Redirect permanent / https://$domain/ \n";
102     + $OUT .= "\n";
103     + }
104     + else {
105     +
106     + $OUT .= " Options -Indexes\n";
107     +
108     + $OUT .= " ServerName $domain\n";
109     +
110     + $OUT .= " SSLEngine on\n";
111     +
112     + $OUT .= " # Encoded slashes need to be allowed\n";
113     + $OUT .= " AllowEncodedSlashes NoDecode\n";
114     +
115     + $OUT .= " # keep the host\n";
116     + $OUT .= " ProxyPreserveHost On\n";
117     +
118     + $OUT .= " # static html, js, images, etc. served from loolwsd\n";
119     + $OUT .= " # loleaflet is the client part of LibreOffice Online\n";
120     + $OUT .= " ProxyPass /loleaflet http://127.0.0.1:9980/loleaflet retry=0\n";
121     + $OUT .= " ProxyPassReverse /loleaflet http://127.0.0.1:9980/loleaflet\n";
122     +
123     + $OUT .= " # static html, js, images, etc. served from coolwsd\n";
124     + $OUT .= " # browser is the client part of LibreOffice Online\n";
125     + $OUT .= " ProxyPass /browser http://127.0.0.1:9980/browser retry=0\n";
126     + $OUT .= " ProxyPassReverse /browser http://127.0.0.1:9980/browser\n";
127     +
128     + $OUT .= " # WOPI discovery URL\n";
129     + $OUT .= " ProxyPass /hosting/discovery http://127.0.0.1:9980/hosting/discovery retry=0\n";
130     + $OUT .= " ProxyPassReverse /hosting/discovery http://127.0.0.1:9980/hosting/discovery\n";
131     +
132     + $OUT .= " # Main websocket\n";
133     + $OUT .= " ProxyPassMatch \"/cool/(.*)/ws\$\" ws://127.0.0.1:9980/cool/\$1/ws nocanon\n";
134     +
135     + $OUT .= " # Admin Console websocket\n";
136     + $OUT .= " ProxyPass /cool/adminws ws://127.0.0.1:9980/cool/adminws\n";
137     +
138     + $OUT .= " # Download as, Fullscreen presentation and Image upload operations\n";
139     + $OUT .= " ProxyPass /cool http://127.0.0.1:9980/cool\n";
140     + $OUT .= " ProxyPassReverse /cool http://127.0.0.1:9980/cool\n";
141     +
142     + $OUT .= " # Compatibility with integrations that use the /lool/convert-to endpoint\n";
143     + $OUT .= " ProxyPass /lool http://127.0.0.1:9980/cool\n";
144     + $OUT .= " ProxyPassReverse /lool http://127.0.0.1:9980/cool\n";
145     +
146     + $OUT .= " # Endpoint with information about availability of various features\n";
147     + $OUT .= " ProxyPass /hosting/capabilities http://127.0.0.1:9980/hosting/capabilities retry=0\n";
148     + $OUT .= " ProxyPassReverse /hosting/capabilities http://127.0.0.1:9980/hosting/capabilities\n";
149     +
150     +
151     + $OUT .= " # base\n";
152     + $OUT .= " ProxyPass / http://127.0.0.1:9980/ retry=0\n";
153     + $OUT .= " ProxyPassReverse / http://127.0.0.1:9980/\n";
154     +
155     + }
156     + }
157     +}
158     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
159     --- 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
160     +++ 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
161     @@ -0,0 +1,2 @@
162     +
163     +<VirtualHost {$ipAddress}:{$port}>
164     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
165     --- 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
166     +++ 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
167     @@ -0,0 +1,2 @@
168     +</VirtualHost>
169     +

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