I want to set up collaborator online (CODE) in my home lab, but I have a problem with the apache server configuration.
This is my situation.
- Reverse proxy server Nginx on Debian 10 (192.168.1.105)
- Nextcloud 23 + Collabora Online on Debian 11 (192.168.1.108)
Nextcloud 23 works very well, I just want to solve Collabora Online.
Install Collabora Online on Debian 11 (192.168.1.108)
sudo apt install apt-transport-https ca-certificates
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0C54D189F4BA284D
nano /etc/apt/sources.list.d/collabora.list
deb https://www.collaboraoffice.com/repos/CollaboraOnline/CODE-debian11 ./
sudo apt update
sudo apt install coolwsd code-brand
Make some changes in the configuration file.
sudo coolconfig set ssl.enable false
sudo coolconfig set ssl.termination true
sudo coolconfig set storage.wopi.host collabora.example.com
sudo coolconfig set-admin-password
sudo systemctl restart coolwsd
restart service
sudo systemctl restart coolwsd.service
sudo systemctl status coolwsd.service
â—Ź coolwsd.service - Collabora Online WebSocket Daemon
Loaded: loaded (/lib/systemd/system/coolwsd.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2022-01-23 15:03:30 CET; 6h ago
Main PID: 161 (coolwsd)
CPU: 53.625s
CGroup: /system.slice/coolwsd.service
├─161 /usr/bin/coolwsd --version --o:sys_template_path=/opt/cool/systemplate --o:child_root_path=/opt/cool/child-roots --o:file_server_root_path=/usr/share/coolwsd
├─465 /usr/bin/coolforkit --losubpath=lo --systemplate=/opt/cool/systemplate --lotemplate=/opt/collaboraoffice --childroot=/opt/cool/child-roots/ --clientport=9980 --masterport=coolwsd>
└─467 /usr/bin/coolforkit --losubpath=lo --systemplate=/opt/cool/systemplate --lotemplate=/opt/collaboraoffice --childroot=/opt/cool/child-roots/ --clientport=9980 --masterport=coolwsd>
Jan 23 20:15:37 debian-11-nextcloud coolwsd[161]: wsd-00161-00479 2022-01-23 20:15:37.966366 +0100 [ websrv_poll ] WRN client - server version mismatch, disabling browser cache. Expected: 21324cf|>
Jan 23 20:15:38 debian-11-nextcloud coolwsd[161]: wsd-00161-00479 2022-01-23 20:15:38.071664 +0100 [ websrv_poll ] WRN client - server version mismatch, disabling browser cache. Expected: 21324cf|>
Jan 23 20:26:06 debian-11-nextcloud coolwsd[161]: wsd-00161-00479 2022-01-23 20:26:06.842804 +0100 [ websrv_poll ] ERR Unknown resource: /_ignition/execute-solution G, host: xx.xx.100.172, path: 2
Jan 23 20:26:06 debian-11-nextcloud coolwsd[161]: [0] '_ignition'
Jan 23 20:26:06 debian-11-nextcloud coolwsd[161]: [1] 'execute-solution'
Jan 23 20:26:06 debian-11-nextcloud coolwsd[161]: full URI: /_ignition/execute-solution| wsd/COOLWSD.cpp:2822
Jan 23 20:46:07 debian-11-nextcloud coolwsd[161]: wsd-00161-00479 2022-01-23 20:46:07.935856 +0100 [ websrv_poll ] ERR Unknown resource: /hosting/discovery H, host: collabora.example.com, path: 2
Jan 23 20:46:07 debian-11-nextcloud coolwsd[161]: [0] 'hosting'
Jan 23 20:46:07 debian-11-nextcloud coolwsd[161]: [1] 'discovery'
Jan 23 20:46:07 debian-11-nextcloud coolwsd[161]: full URI: /hosting/discovery| wsd/COOLWSD.cpp:2822
I’ll configure a reverse proxy server and get TLS certificates.
On debian 10 (192.168.1.105)
Here is the resulting configuration file.
server {
server_name collabora.example.com;
location / {
proxy_pass http://192.168.1.108:9980;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/collabora.example.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/collabora.example.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = collabora.example.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name collabora.example.com;
return 404; # managed by Certbot
}
then i open the web browser url collabora.example.com
The web browser responds OK.
Now I would like to set up an apache2 server, but I don’t know how (on 192.168.1.108)
sudo nano /etc/apache2/sites-available/collabora.example.com.conf
I used this configuration
########################################
# Reverse proxy for Collabora Online
#
########################################
AllowEncodedSlashes NoDecode
ProxyPreserveHost On
# static html, js, images, etc. served from coolwsd
# browser is the client part of Collabora Online
ProxyPass /browser http://127.0.0.1:9980/browser retry=0
ProxyPassReverse /browser http://127.0.0.1:9980/browser
# 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
# Capabilities
ProxyPass /hosting/capabilities http://127.0.0.1:9980/hosting/capabilities retry=0
ProxyPassReverse /hosting/capabilities http://127.0.0.1:9980/hosting/capabilities
# Main websocket
ProxyPassMatch "/cool/(.*)/ws$" ws://127.0.0.1:9980/cool/$1/ws nocanon
# Admin Console websocket
ProxyPass /cool/adminws ws://127.0.0.1:9980/cool/adminws
# Download as, Fullscreen presentation and Image upload operations
ProxyPass /cool http://127.0.0.1:9980/cool
ProxyPassReverse /cool http://127.0.0.1:9980/cool
# Compatibility with integrations that use the /lool/convert-to endpoint
ProxyPass /lool http://127.0.0.1:9980/cool
ProxyPassReverse /lool http://127.0.0.1:9980/cool
sudo a2ensite collabora.example.com.conf
sudo ufw allow 9980
sudo a2enmod proxy
sudo a2enmod proxy_wstunnel
sudo a2enmod proxy_http
sudo a2enmod ssl #Maybe not necessary
sudo systemctl reload apache2
then i open the web browser url https://collabora.example.com/browser/dist/admin/admin.html#
Web admin console does not work.
Now I go to the nextcloud web interface and install collabor online.
Next I go to Settings → Office and set it as it is in the picture.
However, files cannot be edited or created.
I don’t know where I’m making a mistake.