Onlyoffice via subdomain only displays blank page


I’m trying to get Onlyoffice integration working with Seafile CE 6.2.5, however it only displays blank page when I try to open .doc files.
Onlyoffice is installed via subdomain and I get the welcome page on

This is in my

VERIFY_ONLYOFFICE_CERTIFICATE = True   # comment: I also tried with False, no change
ONLYOFFICE_FILE_EXTENSION = ('doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx', 'odt', 'fodt', 'odp', 'fodp', 'ods', 'fods')
ONLYOFFICE_EDIT_FILE_EXTENSION = ('docx', 'pptx', 'xlsx')

But there is only blank page showing up when I click on .doc or .docx files.
Page source shows:

<link rel="icon" href="/media/img/favicon.ico" />
<style type="text/css">
html, body { padding:0; margin:0; }
<div id="placeholder"></div>
<script type="text/javascript" src=""></script>
<script type="text/javascript">
var config = {
    "document": {
        "fileType": "doc",
        "key": "7f01b8831e68e2357f3c",
        "title": "seafile-tutorial.doc",
        "url": "",
        "permissions": {
            "download": true,
            "edit": false,
            "print": true,
            "review": true
    "documentType": "text", // 'text' | 'spreadsheet' | 'presentation',
    "editorConfig": {
        "callbackUrl": "",
        "lang": "de",
        "mode": "view",
        "user": {
            "name": "My Name"
var docEditor = new DocsAPI.DocEditor("placeholder", config);

I’m using Apache and the server is running behind a HAProxy load balancer which might be related to the problem, unfortunately I have no idea what the problem might be.

Maybe anyone else can help?


I just used Chrome Dev console and this is the error I get:

api.js:374 Mixed Content: The page at ‘’ was loaded over HTTPS, but requested an insecure resource ‘’. This request has been blocked; the content must be served over HTTPS.

It is trying to load from http://onlyoffice… instead of https://onlyoffice… which seems to cause the problem. Any idea how to fix this?

Is this domain available and configured for SSL use?

I have a HAProxy loadbalancer server in front of the seafile server. The seafile server is running Apache on port 80, while the HAProxy does SSL handling.

This is what I have in haproxy.cfg:

frontend http-in
        bind :80
        bind *:443 ssl crt /etc/ssl/

        # Redirect if HTTPS is *not* used
        redirect scheme https code 301 if !{ ssl_fc }

        acl seafile hdr_beg(host) -i
        acl onlyoffice hdr_beg(host) -i

        use_backend sf if seafile
        use_backend oo if onlyoffice

backend sf
        server node2 check

backend oo
        server node3 check is IP of my seafile server and it is listening on port 80 for seafile requests and port 8090 is used for onlyoffice running in a docker container on same server with

sudo docker run -i -t -d -p 8090:80 --restart=always --name oods onlyoffice/documentserver`

Configure self signed certs internally and use SSL internally. Then try again.
Seems a redirect problem for me. Haproxy allows redirects?

In haproxy.cfg I disabled forwarding to SSL port 443 and tested again without SSL and then it works, Onlyoffice shows up and I can edit the file.
But of course I need to get it working with SSL… just need to figure out what exactly the problem is and how to fix it.

Looks like I get it working adding just one setting to haproxy.cfg for the backend oo:

backend oo
        http-request add-header X-Forwarded-Proto https if { ssl_fc }
        server node3 check

I found the solution on this web site: