Having lost a lot of time in search since a while for an easy solution, I'm happy to share the nice way to do it in a virtualhost in Virtualmin without breaking everything ! The idea is that one: you have setup a Nextcloud or Owncloud in Virtualmin and you want to be able to get a full "Google" drive where you can edit files directly in web browser in shared mode
Let's see how to do that in an easy way (tutorial based on OS Ubuntu 16.04 with Virtualmin/webmin up-to-date and you need either SSH access at server or use the mini-terminal included in Virtualmin):
<cert_file_path desc="Path to the cert file" relative="false">/etc/loolwsd/ssl.cert</cert_file_path>As you can see I changed the default SSL files path to directory of Collabora settings so now Collabora will use same SSL CERT as website of my Nextcloud instance.
<key_file_path desc="Path to the key file" relative="false">/etc/loolwsd/ssl.key</key_file_path>
<ca_file_path desc="Path to the ca file" relative="false">/etc/loolwsd/ssl.ca</ca_file_path>
a2enmod proxyand then you can restart Apache to activate the new modules.
# Encoded slashes need to be allowedYou can then save the file and restart apache so new directives are applied.
# Container uses a unique non-signed certificate
# keep the host
# static html, js, images, etc. served from loolwsd
# loleaflet is the client part of Collabora 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
ProxyPass /hosting/capabilities https://127.0.0.1:9980/hosting/capabilities retry=0
ProxyPassReverse /hosting/capabilities https://127.0.0.1:9980/hosting/capabilities
# 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
Feel free to post comments for corrections, mistakes and hope it'll help !
I'll update it if needed (at least the SSL keys part as for now my trick is not really nice !