Apache reverse proxy problems (self-compiled LibreOffice Online)


I’ve got problems to get my Apache reverse proxy to run as expected: I’ve compiled LIbreOffice Online using the script provided by husisusi. Loolwsd seems to run as expected but sadly I’ve got problems with my apache reverse proxy configuration. I can for example access the site /hosting/discovery by not using the proxy (e.g. https://office.domain.com:9980/hosting/discovery).
I can’t access the site if I’m using the url https://office.domain.com/hosting/discovery. If I’m using this url I’m getting a page of my blog which states that this page is not available.

My activated apache vhosts are the follwing for the proxy settings:


<VirtualHost *:80>
 ServerName office.domain.com
 Redirect / https://office.domain.com


<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName office.domain.com
# SSL configuration, you may want to take the easy route instead and use Lets Encrypt!
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/www.domain.com/cert.pem
SSLCertificateChainFile /etc/letsencrypt/live/www.domain.com/chain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/www.domain.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
SSLProtocol             all -SSLv2 -SSLv3
SSLHonorCipherOrder     on
# Encoded slashes need to be allowed
AllowEncodedSlashes NoDecode
# Container 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           /loleaflet retry=0
ProxyPassReverse    /loleaflet
# WOPI discovery URL
ProxyPass           /hosting/discovery retry=0
ProxyPassReverse    /hosting/discovery
# Main websocket
ProxyPassMatch "/lool/(.*)/ws$" wss://$1/ws nocanon
# Admin Console websocket
ProxyPass   /lool/adminws wss://
# Download as, Fullscreen presentation and Image upload operations
ProxyPass           /lool
ProxyPassReverse    /lool

Sadly I’ve got no idea what I’m doing wrong. Can someone help me?

Use the official script instead: https://github.com/nextcloud/vm/blob/master/apps/collabora.sh

@enoch85 The official script doesn’t do what I want (e.g. it installs the docker image) and there is no connection to my apache proxy problem.

Is there someone who has got an idea why my apache proxy settings doesn’t have an effect?

I’ve found the cause of my problem: I had a ServerAlias office.domain.com in my default-ssl.conf. After commenting out the proxy settings are working as expected.