I managed to have builtin CODE server load .odt
document locally (on http://docker-node-01:8082/
URL, containerized) but when I use Apache it keeps Loading and nothing happens.
My apache config (replaced my domain name with example.com
:
<VirtualHost *:443>
ServerName cloud.example.com
ServerAdmin root@example.com
ErrorLog /var/log/httpd/cloud.example.com_error.log
CustomLog /var/log/httpd/cloud.example.com_access.log combined
SSLProxyEngine on
SSLProxyVerify none
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
SSLProxyCheckPeerExpire off
ProxyPass / http://docker-node-01:8082/
ProxyPassReverse / http://docker-node-01:8082/
ProxyPassReverseCookiePath / /
# SSL
SSLEngine on
SSLProtocol all -SSLv2 -SSLv3
SSLHonorCipherOrder on
SSLCipherSuite "EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM \
EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 \
EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 \
EECDH EDH+aRSA \
!aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS !RC4"
SSLInsecureRenegotiation off
SSLCertificateFile /etc/httpd/ssl/example.com/example.com.crt
SSLCertificateChainFile /etc/httpd/ssl/example.com/example.com.chain.crt
SSLCertificateKeyFile /etc/httpd/ssl/example.com/example.com.key
</VirtualHost>
Lots of important configuration seems to be missing.
Did you check Collabora’s Apache reverse proxy docs, it basically has a working example?
And don’t forget to limit your Docker container to listen only to localhost if you want to avoid direct connections to the CODE server via Internet, bypassing the reverse proxy.
I managed to have working CODE server by putting URL to Nextcloud Office configuration in Nextcloud app (collabora docker container):
http://docker-node-01:9980/
However it only works internally. I tried the following Apache config:
<VirtualHost *:443>
ServerName office.example.com
ServerAdmin root@example.com
ErrorLog /var/log/httpd/office.example.com_error.log
CustomLog /var/log/httpd/office.example.com_access.log combined
SSLProxyEngine on
SSLProxyVerify none
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
SSLProxyCheckPeerExpire off
AllowEncodedSlashes NoDecode
ProxyPreserveHost On
# static html, js, images, etc. served from coolwsd
# browser is the client part of Collabora Online
ProxyPass /browser http://docker-node-01:9980/browser retry=0
ProxyPassReverse /browser http://docker-node-01:9980/browser
# WOPI discovery URL
ProxyPass /hosting/discovery http://docker-node-01:9980/hosting/discovery retry=0
ProxyPassReverse /hosting/discovery http://docker-node-01:9980/hosting/discovery
# Capabilities
ProxyPass /hosting/capabilities http://docker-node-01:9980/hosting/capabilities retry=0
ProxyPassReverse /hosting/capabilities http://docker-node-01:9980/hosting/capabilities
# Main websocket
ProxyPassMatch "/cool/(.*)/ws$" ws://docker-node-01:9980/cool/$1/ws nocanon
# Admin Console websocket
ProxyPass /cool/adminws ws://docker-node-01:9980/cool/adminws
# Download as, Fullscreen presentation and Image upload operations
ProxyPass /cool http://docker-node-01:9980/cool
ProxyPassReverse /cool http://docker-node-01:9980/cool
# Compatibility with integrations that use the /lool/convert-to endpoint
ProxyPass /lool http://docker-node-01:9980/cool
ProxyPassReverse /lool http://docker-node-01:9980/cool
# SSL
SSLEngine on
SSLProtocol all -SSLv2 -SSLv3
SSLHonorCipherOrder on
SSLCipherSuite "EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM \
EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 \
EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 \
EECDH EDH+aRSA \
!aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS !RC4"
SSLInsecureRenegotiation off
SSLCertificateFile /etc/httpd/ssl/example.com/example.com.crt
SSLCertificateChainFile /etc/httpd/ssl/example.com/example.com.chain.crt
SSLCertificateKeyFile /etc/httpd/ssl/example.com/example.com.key
</VirtualHost>
and I put office.example.com
as CODE server URL, it says OK but still I get an error Document loading failed
.