[Libreoffice-commits] online.git: 3 commits - etc/apache2 etc/nginx Makefile.am

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sat Oct 27 12:48:28 UTC 2018


 Makefile.am                             |   10 ++++++++
 etc/apache2/loolwsd-nossl.conf.template |   34 ---------------------------
 etc/apache2/loolwsd-ssl.conf.template   |   40 --------------------------------
 etc/apache2/loolwsd.conf                |   31 ++++++++++++++++++++++++
 etc/nginx/loolwsd-ssl.conf.template     |   36 ----------------------------
 etc/nginx/loolwsd.conf                  |   10 ++++----
 6 files changed, 46 insertions(+), 115 deletions(-)

New commits:
commit c599fcdb66caa8d637dfcdddded81c9478286938
Author:     Andras Timar <andras.timar at collabora.com>
AuthorDate: Sat Oct 27 14:46:59 2018 +0200
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Sat Oct 27 14:47:45 2018 +0200

    add webserver config snippets to distribution tarball
    
    Change-Id: Id8b782ab534f9534cde28b4c9a26dcbfddf8f835

diff --git a/Makefile.am b/Makefile.am
index 9913867a8..e8b0dec89 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -41,6 +41,14 @@ loolwsdconfigdir = @LOOLWSD_CONFIGDIR@
 loolwsdconfig_DATA = loolwsd.xml \
 		     loolkitconfig.xcu
 
+apache2configdir = ${sysconfdir}/apache2/conf-available
+
+apache2config_DATA = etc/apache2/loolwsd.conf
+
+nginxconfigdir = ${sysconfdir}/nginx/snippets
+
+nginxconfig_DATA = etc/nginx/loolwsd.conf
+
 ACLOCAL_AMFLAGS = -I m4
 
 # quick and easy for now.
@@ -244,6 +252,8 @@ EXTRA_DIST = discovery.xml \
              etc/key.pem \
              etc/cert.pem \
              etc/ca-chain.cert.pem \
+             etc/apache2/loolwsd.conf \
+             etc/nginx/loolwsd.conf \
              scripts/unocommands.py \
              $(man_MANS)
 
commit b2272c5924c12d1914bb445945126fafd5b4512f
Author:     Andras Timar <andras.timar at collabora.com>
AuthorDate: Fri Oct 26 16:39:09 2018 +0200
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Sat Oct 27 14:47:45 2018 +0200

    drop ssl configs, we want the simplest case, which is nossl
    
    Change-Id: I788690cb3361b50a6db33f1c87b236b59b94821b

diff --git a/etc/apache2/loolwsd-ssl.conf b/etc/apache2/loolwsd-ssl.conf
deleted file mode 100644
index 324ad445d..000000000
--- a/etc/apache2/loolwsd-ssl.conf
+++ /dev/null
@@ -1,37 +0,0 @@
-# Apache2 reverse proxy configuration for Collabora Online / LibreOffice Online
-# Internet <-- SSL --> Reverse Proxy <-- SSL --> loolwsd
-# Make sure that you enable the following Apache2 modules: proxy, proxy_wstunnel, proxy_http, and ssl.
-# Create a virtual host for Collabora Online / LibreOffice Online and include this configuration file.
-
-  Options -Indexes
-
-  # Encoded slashes need to be allowed
-  AllowEncodedSlashes NoDecode
-
-  # in most configurations loolwsd uses a self-signed certificate
-  SSLProxyEngine On
-  SSLProxyVerify None
-  SSLProxyCheckPeerCN Off
-  SSLProxyCheckPeerName Off
-
-  # keep the host
-  ProxyPreserveHost On
-
-  # static html, js, images, etc. served from loolwsd
-  # loleaflet is the client part of LibreOffice Online
-  ProxyPass           /loleaflet https://127.0.0.1:9980/loleaflet retry=0
-  ProxyPassReverse    /loleaflet https://127.0.0.1:9980/loleaflet
-
-  # WOPI discovery URL
-  ProxyPass           /hosting/discovery https://127.0.0.1:9980/hosting/discovery retry=0
-  ProxyPassReverse    /hosting/discovery https://127.0.0.1:9980/hosting/discovery
-
-  # Main websocket
-  ProxyPassMatch "/lool/(.*)/ws$" wss://127.0.0.1:9980/lool/$1/ws nocanon
-
-  # Admin Console websocket
-  ProxyPass   /lool/adminws wss://127.0.0.1:9980/lool/adminws
-
-  # Download as, Fullscreen presentation and Image upload operations
-  ProxyPass           /lool https://127.0.0.1:9980/lool
-  ProxyPassReverse    /lool https://127.0.0.1:9980/lool
diff --git a/etc/apache2/loolwsd-nossl.conf b/etc/apache2/loolwsd.conf
similarity index 100%
rename from etc/apache2/loolwsd-nossl.conf
rename to etc/apache2/loolwsd.conf
diff --git a/etc/nginx/loolwsd-ssl.conf b/etc/nginx/loolwsd-ssl.conf
deleted file mode 100644
index 279f23a5b..000000000
--- a/etc/nginx/loolwsd-ssl.conf
+++ /dev/null
@@ -1,36 +0,0 @@
-
-    # static files
-    location ^~ /loleaflet {
-        proxy_pass https://localhost:9980;
-        proxy_set_header Host $http_host;
-    }
-
-    # WOPI discovery URL
-    location ^~ /hosting/discovery {
-        proxy_pass https://localhost:9980;
-        proxy_set_header Host $http_host;
-    }
-
-    # main websocket
-    location ~ ^/lool/(.*)/ws$ {
-        proxy_pass https://localhost:9980;
-        proxy_set_header Upgrade $http_upgrade;
-        proxy_set_header Connection "Upgrade";
-        proxy_set_header Host $http_host;
-        proxy_read_timeout 36000s;
-    }
-
-    # download, presentation and image upload
-    location ~ ^/lool {
-        proxy_pass https://localhost:9980;
-        proxy_set_header Host $http_host;
-    }
-
-    # Admin Console websocket
-    location ^~ /lool/adminws {
-        proxy_pass https://localhost:9980;
-        proxy_set_header Upgrade $http_upgrade;
-        proxy_set_header Connection "Upgrade";
-        proxy_set_header Host $http_host;
-        proxy_read_timeout 36000s;
-    }
diff --git a/etc/nginx/loolwsd-nossl.conf b/etc/nginx/loolwsd.conf
similarity index 100%
rename from etc/nginx/loolwsd-nossl.conf
rename to etc/nginx/loolwsd.conf
commit 20e918b73226fd79c6045d67aab623e4ed6732c8
Author:     Andras Timar <andras.timar at collabora.com>
AuthorDate: Fri Oct 26 16:35:09 2018 +0200
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Sat Oct 27 14:47:45 2018 +0200

    service_root is advanced setting, forget it for now in sample configs
    
    Change-Id: I181faaff1eff0d27fa09032f75c03f288b7cad1f

diff --git a/etc/apache2/loolwsd-nossl.conf b/etc/apache2/loolwsd-nossl.conf
new file mode 100644
index 000000000..10b66b47f
--- /dev/null
+++ b/etc/apache2/loolwsd-nossl.conf
@@ -0,0 +1,31 @@
+# Apache2 reverse proxy configuration for Collabora Online / LibreOffice Online
+# Internet <-- SSL --> Reverse Proxy <-- No SSL --> loolwsd
+# Make sure that you enable the following Apache2 modules: proxy, proxy_wstunnel, and proxy_http.
+# Create a virtual host for Collabora Online / LibreOffice Online and include this configuration file.
+
+  Options -Indexes
+
+  # Encoded slashes need to be allowed
+  AllowEncodedSlashes NoDecode
+
+  # keep the host
+  ProxyPreserveHost On
+
+  # static html, js, images, etc. served from loolwsd
+  # loleaflet is the client part of LibreOffice Online
+  ProxyPass           /loleaflet http://127.0.0.1:9980/loleaflet retry=0
+  ProxyPassReverse    /loleaflet http://127.0.0.1:9980/loleaflet
+
+  # WOPI discovery URL
+  ProxyPass           /hosting/discovery http://127.0.0.1:9980/hosting/discovery retry=0
+  ProxyPassReverse    /hosting/discovery http://127.0.0.1:9980/hosting/discovery
+
+  # Main websocket
+  ProxyPassMatch "/lool/(.*)/ws$" ws://127.0.0.1:9980/lool/$1/ws nocanon
+
+  # Admin Console websocket
+  ProxyPass   /lool/adminws ws://127.0.0.1:9980/lool/adminws
+
+  # Download as, Fullscreen presentation and Image upload operations
+  ProxyPass           /lool http://127.0.0.1:9980/lool
+  ProxyPassReverse    /lool http://127.0.0.1:9980/lool
diff --git a/etc/apache2/loolwsd-nossl.conf.template b/etc/apache2/loolwsd-nossl.conf.template
deleted file mode 100644
index 289b79d3e..000000000
--- a/etc/apache2/loolwsd-nossl.conf.template
+++ /dev/null
@@ -1,34 +0,0 @@
-# Apache2 reverse proxy configuration for Collabora Online / LibreOffice Online
-# Internet <-- SSL --> Reverse Proxy <-- No SSL --> loolwsd
-# Make sure that you enable the following Apache2 modules: proxy, proxy_wstunnel, and proxy_http.
-# Create a virtual host for Collabora Online / LibreOffice Online and include this configuration file.
-
-# loolwsd_service_root (introduced in Collabora Online 3.4 and LibreOffce Online 6.2)
-# Prefix all the pages, websockets, etc. with this path.
-
-  Options -Indexes
-
-  # Encoded slashes need to be allowed
-  AllowEncodedSlashes NoDecode
-
-  # keep the host
-  ProxyPreserveHost On
-
-  # static html, js, images, etc. served from loolwsd
-  # loleaflet is the client part of LibreOffice Online
-  ProxyPass           ${loolwsd_service_root}/loleaflet http://127.0.0.1:9980${loolwsd_service_root}/loleaflet retry=0
-  ProxyPassReverse    ${loolwsd_service_root}/loleaflet http://127.0.0.1:9980${loolwsd_service_root}/loleaflet
-
-  # WOPI discovery URL
-  ProxyPass           ${loolwsd_service_root}/hosting/discovery http://127.0.0.1:9980${loolwsd_service_root}/hosting/discovery retry=0
-  ProxyPassReverse    ${loolwsd_service_root}/hosting/discovery http://127.0.0.1:9980${loolwsd_service_root}/hosting/discovery
-
-  # Main websocket
-  ProxyPassMatch "${loolwsd_service_root}/lool/(.*)/ws$" ws://127.0.0.1:9980${loolwsd_service_root}/lool/$1/ws nocanon
-
-  # Admin Console websocket
-  ProxyPass   ${loolwsd_service_root}/lool/adminws ws://127.0.0.1:9980${loolwsd_service_root}/lool/adminws
-
-  # Download as, Fullscreen presentation and Image upload operations
-  ProxyPass           ${loolwsd_service_root}/lool http://127.0.0.1:9980${loolwsd_service_root}/lool
-  ProxyPassReverse    ${loolwsd_service_root}/lool http://127.0.0.1:9980${loolwsd_service_root}/lool
diff --git a/etc/apache2/loolwsd-ssl.conf b/etc/apache2/loolwsd-ssl.conf
new file mode 100644
index 000000000..324ad445d
--- /dev/null
+++ b/etc/apache2/loolwsd-ssl.conf
@@ -0,0 +1,37 @@
+# Apache2 reverse proxy configuration for Collabora Online / LibreOffice Online
+# Internet <-- SSL --> Reverse Proxy <-- SSL --> loolwsd
+# Make sure that you enable the following Apache2 modules: proxy, proxy_wstunnel, proxy_http, and ssl.
+# Create a virtual host for Collabora Online / LibreOffice Online and include this configuration file.
+
+  Options -Indexes
+
+  # Encoded slashes need to be allowed
+  AllowEncodedSlashes NoDecode
+
+  # in most configurations loolwsd uses a self-signed certificate
+  SSLProxyEngine On
+  SSLProxyVerify None
+  SSLProxyCheckPeerCN Off
+  SSLProxyCheckPeerName Off
+
+  # keep the host
+  ProxyPreserveHost On
+
+  # static html, js, images, etc. served from loolwsd
+  # loleaflet is the client part of LibreOffice Online
+  ProxyPass           /loleaflet https://127.0.0.1:9980/loleaflet retry=0
+  ProxyPassReverse    /loleaflet https://127.0.0.1:9980/loleaflet
+
+  # WOPI discovery URL
+  ProxyPass           /hosting/discovery https://127.0.0.1:9980/hosting/discovery retry=0
+  ProxyPassReverse    /hosting/discovery https://127.0.0.1:9980/hosting/discovery
+
+  # Main websocket
+  ProxyPassMatch "/lool/(.*)/ws$" wss://127.0.0.1:9980/lool/$1/ws nocanon
+
+  # Admin Console websocket
+  ProxyPass   /lool/adminws wss://127.0.0.1:9980/lool/adminws
+
+  # Download as, Fullscreen presentation and Image upload operations
+  ProxyPass           /lool https://127.0.0.1:9980/lool
+  ProxyPassReverse    /lool https://127.0.0.1:9980/lool
diff --git a/etc/apache2/loolwsd-ssl.conf.template b/etc/apache2/loolwsd-ssl.conf.template
deleted file mode 100644
index 63e128028..000000000
--- a/etc/apache2/loolwsd-ssl.conf.template
+++ /dev/null
@@ -1,40 +0,0 @@
-# Apache2 reverse proxy configuration for Collabora Online / LibreOffice Online
-# Internet <-- SSL --> Reverse Proxy <-- SSL --> loolwsd
-# Make sure that you enable the following Apache2 modules: proxy, proxy_wstunnel, proxy_http, and ssl.
-# Create a virtual host for Collabora Online / LibreOffice Online and include this configuration file.
-
-# loolwsd_service_root (introduced in Collabora Online 3.4 and LibreOffce Online 6.2)
-# Prefix all the pages, websockets, etc. with this path.
-
-  Options -Indexes
-
-  # Encoded slashes need to be allowed
-  AllowEncodedSlashes NoDecode
-
-  # in most configurations loolwsd uses a unique non-signed certificate
-  SSLProxyEngine On
-  SSLProxyVerify None
-  SSLProxyCheckPeerCN Off
-  SSLProxyCheckPeerName Off
-
-  # keep the host
-  ProxyPreserveHost On
-
-  # static html, js, images, etc. served from loolwsd
-  # loleaflet is the client part of LibreOffice Online
-  ProxyPass           ${loolwsd_service_root}/loleaflet https://127.0.0.1:9980${loolwsd_service_root}/loleaflet retry=0
-  ProxyPassReverse    ${loolwsd_service_root}/loleaflet https://127.0.0.1:9980${loolwsd_service_root}/loleaflet
-
-  # WOPI discovery URL
-  ProxyPass           ${loolwsd_service_root}/hosting/discovery https://127.0.0.1:9980${loolwsd_service_root}/hosting/discovery retry=0
-  ProxyPassReverse    ${loolwsd_service_root}/hosting/discovery https://127.0.0.1:9980${loolwsd_service_root}/hosting/discovery
-
-  # Main websocket
-  ProxyPassMatch "${loolwsd_service_root}/lool/(.*)/ws$" wss://127.0.0.1:9980${loolwsd_service_root}/lool/$1/ws nocanon
-
-  # Admin Console websocket
-  ProxyPass   ${loolwsd_service_root}/lool/adminws wss://127.0.0.1:9980${loolwsd_service_root}/lool/adminws
-
-  # Download as, Fullscreen presentation and Image upload operations
-  ProxyPass           ${loolwsd_service_root}/lool https://127.0.0.1:9980${loolwsd_service_root}/lool
-  ProxyPassReverse    ${loolwsd_service_root}/lool https://127.0.0.1:9980${loolwsd_service_root}/lool
diff --git a/etc/nginx/loolwsd-nossl.conf.template b/etc/nginx/loolwsd-nossl.conf
similarity index 76%
rename from etc/nginx/loolwsd-nossl.conf.template
rename to etc/nginx/loolwsd-nossl.conf
index bcadf278a..f55f8829b 100644
--- a/etc/nginx/loolwsd-nossl.conf.template
+++ b/etc/nginx/loolwsd-nossl.conf
@@ -1,17 +1,17 @@
     # static files
-    location ^~ ${loolwsd_service_root}/loleaflet {
+    location ^~ /loleaflet {
         proxy_pass http://localhost:9980;
         proxy_set_header Host $http_host;
     }
 
     # WOPI discovery URL
-    location ^~ ${loolwsd_service_root}/hosting/discovery {
+    location ^~ /hosting/discovery {
         proxy_pass http://localhost:9980;
         proxy_set_header Host $http_host;
     }
 
     # main websocket
-    location ~ ^${loolwsd_service_root}/lool/(.*)/ws$ {
+    location ~ ^/lool/(.*)/ws$ {
         proxy_pass http://localhost:9980;
         proxy_set_header Upgrade $http_upgrade;
         proxy_set_header Connection "Upgrade";
@@ -20,13 +20,13 @@
     }
 
     # download, presentation and image upload
-    location ~ ^${loolwsd_service_root}/lool {
+    location ~ ^/lool {
         proxy_pass http://localhost:9980;
         proxy_set_header Host $http_host;
     }
 
     # Admin Console websocket
-    location ^~ ${loolwsd_service_root}/lool/adminws {
+    location ^~ /lool/adminws {
         proxy_pass http://localhost:9980;
         proxy_set_header Upgrade $http_upgrade;
         proxy_set_header Connection "Upgrade";
diff --git a/etc/nginx/loolwsd-ssl.conf.template b/etc/nginx/loolwsd-ssl.conf
similarity index 76%
rename from etc/nginx/loolwsd-ssl.conf.template
rename to etc/nginx/loolwsd-ssl.conf
index 1190fb54c..279f23a5b 100644
--- a/etc/nginx/loolwsd-ssl.conf.template
+++ b/etc/nginx/loolwsd-ssl.conf
@@ -1,18 +1,18 @@
 
     # static files
-    location ^~ ${loolwsd_service_root}/loleaflet {
+    location ^~ /loleaflet {
         proxy_pass https://localhost:9980;
         proxy_set_header Host $http_host;
     }
 
     # WOPI discovery URL
-    location ^~ ${loolwsd_service_root}/hosting/discovery {
+    location ^~ /hosting/discovery {
         proxy_pass https://localhost:9980;
         proxy_set_header Host $http_host;
     }
 
     # main websocket
-    location ~ ^${loolwsd_service_root}/lool/(.*)/ws$ {
+    location ~ ^/lool/(.*)/ws$ {
         proxy_pass https://localhost:9980;
         proxy_set_header Upgrade $http_upgrade;
         proxy_set_header Connection "Upgrade";
@@ -21,13 +21,13 @@
     }
 
     # download, presentation and image upload
-    location ~ ^${loolwsd_service_root}/lool {
+    location ~ ^/lool {
         proxy_pass https://localhost:9980;
         proxy_set_header Host $http_host;
     }
 
     # Admin Console websocket
-    location ^~ ${loolwsd_service_root}/lool/adminws {
+    location ^~ /lool/adminws {
         proxy_pass https://localhost:9980;
         proxy_set_header Upgrade $http_upgrade;
         proxy_set_header Connection "Upgrade";


More information about the Libreoffice-commits mailing list