1 month and collabora still not working

Hello,

i have a nextcloud 18.0.6 server on debian 10
i’m using apache 2.4.38-3+deb10u4

nextcloud works perfectly

so i need to use collabora online and follow this install guide: https://nextcloud.com/fr_FR/collaboraonline/

my nextcloud server named phi.domain.com so i started collabora container with:

docker run -t -d -p 127.0.0.1:9980:9980 -e 'domain=phi\\.domain\\.com' --restart always --cap-add MKNOD collabora/code

this is the virtualhost of my collabora server:

cat /etc/apache2/sites-available/collabora.conf
<VirtualHost *:443>
ServerName collabora.domain.com:443

ErrorLog /var/log/Collaboraonline/error.log

# SSL configuration, you may want to take the easy route instead and use Lets Encrypt!
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/collabora.domain.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/collabora.domain.com/privkey.pem
SSLProtocol -all +TLSv1.2 +TLSv1.3
# Suite de chiffrements TLSv1.2
SSLCipherSuite SSL ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
# Suite de chiffrements TLSv1.3
SSLCipherSuite TLSv1.3 TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256
SSLHonorCipherOrder     on
SSLOpenSSLConfCmd Curves X25519:secp521r1:secp384r1:prime256v1

# 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 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

# Endpoint with information about availability of various features
ProxyPass           /hosting/capabilities https://127.0.0.1:9980/hosting/capabilities retry=0
ProxyPassReverse    /hosting/capabilities https://127.0.0.1:9980/hosting/capabilities
</VirtualHost>

No error when i restart apache2

proxy seems to be OK

But when in nextcloud i want to add the url https://collabora.domain.com, the system refused this URL: Could not establish connection to the Collabora Online server

i reboot my server and documents is not install in nextcloud

More informations:

# docker ps
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                      NAMES
    3837af505414        collabora/code      "/bin/sh -c 'bash st…"   24 minutes ago      Up 24 minutes       127.0.0.1:9980->9980/tcp   competent_bartik

# ps aux | grep 9980
root      1939  0.0  0.1 401360  7584 ?        Sl   15:23   0:00 /usr/bin/docker-proxy -proto tcp -host-ip 127.0.0.1 -host-port 9980 -container-ip 172.17.0.2 -container-port 9980
systemd+  2023  0.3 12.0 1134260 473380 pts/0  S+   15:23   0:04 /usr/bin/loolforkit          --losubpath=lo --systemplate=/opt/lool/systemplate --lotemplate=/opt/collaboraoffice6.4 --childroot=/opt/lool/child-roots/ --clientport=9980 --masterport=loolwsd-LAhI1wMR --rlimits=limit_virt_mem_mb:0;limit_stack_mem_kb:8000;limit_file_size_mb:0;limit_num_open_files:0 --version --ui=notebookbar
systemd+  2031  0.1  9.5 1134812 376952 pts/0  S+   15:23   0:02 /usr/bin/loolforkit          --losubpath=lo --systemplate=/opt/lool/systemplate --lotemplate=/opt/collaboraoffice6.4 --childroot=/opt/lool/child-roots/ --clientport=9980 --masterport=loolwsd-LAhI1wMR --rlimits=limit_virt_mem_mb:0;limit_stack_mem_kb:8000;limit_file_size_mb:0;limit_num_open_files:0 --version --ui=notebookbar
systemd+  2059  0.0  9.5 1134812 376768 pts/0  S+   15:23   0:00 /usr/bin/loolforkit          --losubpath=lo --systemplate=/opt/lool/systemplate --lotemplate=/opt/collaboraoffice6.4 --childroot=/opt/lool/child-roots/ --clientport=9980 --masterport=loolwsd-LAhI1wMR --rlimits=limit_virt_mem_mb:0;limit_stack_mem_kb:8000;limit_file_size_mb:0;limit_num_open_files:0 --version --ui=notebookbar
root      2871  0.0  0.0   6092   820 pts/0    S+   15:48   0:00 grep 9980

Thank you in advance for your help

If your WOPI server is running you should at least be able to reach it. You may check it with:

https://collabora.domain.com/loleaflet/dist/admin/admin.html

https://collabora.domain.com/loleaflet/dist/admin/admin.html redirect me to https://collabora.domain.com/index.php/login who is the login page of my nextcloud server https://phi.domain.com/index.php/login :roll_eyes:

this is my apache nextcloud.conf file:

<VirtualHost 172.16.0.116:80>
       ServerName phi.domain.com
       Redirect permanent / https://phi.domain.com

</VirtualHost>

<VirtualHost 172.16.0.116:443>
        ServerName phi.domain.lan
        ServerAlias phi.domain.com
        DocumentRoot "/var/www/nextcloud/"
        <Directory "/var/www/nextcloud/">
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                Allow from all
        </Directory>
        SSLEngine on
        SSLVerifyClient none
        SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0ean-shutdown downgrade-1.0 force-response-1.0
        SSLProtocol -all +TLSv1.2 +TLSv1.3
        SSLCipherSuite SSL ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
        SSLCipherSuite TLSv1.3 TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256
        SSLHonorCipherOrder on
        SSLOpenSSLConfCmd Curves X25519:secp521r1:secp384r1:prime256v1
        SSLCertificateFile /etc/letsencrypt/live/phi.domain.com/fullchain.pem
        SSLCertificateKeyFile /etc/letsencrypt/live/phi.domain.com/privkey.pem
        Include /etc/letsencrypt/options-ssl-apache.conf
        #SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0
        ServerSignature Off
        <IfModule mod_headers.c>
        Header always set Strict-Transport-Security "max-age=15768000; includeSubDomains; preload"
        </IfModule>
        ErrorLog /var/log/apache2/nextcloud-error.log
        LogLevel warn
</virtualHost>

and now, after serveral tests: 404 error: Page not found :crazy_face:

Well, I don’t know docker so I can’t help you there. But for a guess I would think the starting of docker is maybe wrong:
" Additionally, the operator can set any environment variable in the container by using one or more -e flags, even overriding those mentioned above, or already defined by the developer with a Dockerfile ENV . If the operator names an environment variable without specifying a value, then the current value of the named variable is propagated into the container’s environment"

Collabora is alive in my Nextcloud server :nerd_face:

So this is how i solved this problem:

172.16.0.116 is the local network IP of my nextcloud server named phi.domain.com

After docker install i’d started collabora container with this command:

docker run -t -d -p 9980:9980 -e 'domain=phi\\.domain\\.com' --restart always --cap-add MKNOD collabora/code

i don’t used the local IP 127.0.0.1

netstat -lnpt
tcp6       0      0 :::9980                 :::*                    LISTEN      2184/docker-proxy

Ok docker is alive and listen 9980 port

Wopi server is alive at this URL/ https://collabora.domain.com:9980/loleaflet/dist/admin/admin.html

at the end i’d created my collabora.conf apache file like indicated in the install guide, but i remplace all 127.0.0.1 ip by 172.16.0.116 (local network IP of my nextcloud server), and add my url https://collabora.domain.com in nextcloud.