Page 1 of 1

[SOLVED] SSL with apache2 and Onlyoffice document server

PostPosted: Wed Jul 13, 2016 12:09 pm
by firlevapz
Hi there,

I have installed the onlyoffice-bundle with mailserver, document server and community server via docker on a linux machine with the internal IP 10.0.0.80. This machine is behind a Apache webproxy to be accessible from the outside world via SSL, e.g. https://docs.example.com
The connection to the community-server works fine, but whenever i want to open a document from the document server in the browser, the document loads infinitely :(
It works fine, when i access it directly on the linux server where the docker images are running, but not via the apache proxy.
My proxy configuration is as following:

Code: Select all
    <VirtualHost *:443>
      ServerAdmin admin@example.com
      ServerName docs.example.com

      SSLEngine on
      SSLProxyEngine on
      SSLCertificateFile /etc/apache2/ssl/docs.example.com.crt
      SSLCertificateKeyFile /etc/apache2/ssl/docs.example.com.key
      SSLCertificateChainFile /etc/apache2/ssl/chain.crt

        RewriteEngine On
        RewriteCond %{HTTP:Connection} Upgrade [NC]
        RewriteCond %{HTTP:Upgrade} websocket [NC]
        RewriteRule /(.*) ws://10.0.0.80/$1 [P,L]

        ProxyRequests off
        <Location />
                ProxyPass http://10.0.0.80/
                ProxyPassReverse /
        </Location>
      <IfModule mod_headers.c>
        Header always set Strict-Transport-Security "max-age=15768000; includeSubDomains; preload"
      </IfModule>

    </VirtualHost>


I also tried to change the address of the community-server to docs.example.com instead of 10.0.0.80, but it didn't work either...

Anyone any ideas or suggestions what i could try??

Re: SSL with apache2 and Onlyoffice document server

PostPosted: Fri Jul 15, 2016 7:25 am
by firlevapz
I just fixed it myself - just had to install the same certificate on the docker installation as well, and then changed the configuration of apache to forward to the https://docs.example.com site instead of the IP, then it worked!