Hello, I’m using the node js example app to get started - I just want to get it running and verify all my configuration, then I plan to write my own integration from there.
I don’t have Ubuntu installed on any of my machines, so I have everything running within a Docker container in Arch. Aside from that (and a little trick to get the systemctl
command working, as the installer requires it), I’ve performed a normal installation on an Ubuntu system.
First I tried without HTTPS, but with JWT enabled. This works great, but the example node.js app actually has tokens disabled by default which was little tricky to find. I have the example app and document server both running inside my Ubuntu container, and I can create a new document and open it.
Now HTTPS. I am attempting to integrate with an app that requires HTTPS, therefore I need HTTPS enabled even when testing locally. I am using minica
to accomplish this, as that’s what’s recommend by Let’s Encrypt for this purpose. (i.e. I cannot use certbot here because it’s inappropriate for local IPs and my cert may be revoked)
I also require the example app to run under HTTPS in order to test this. To do this, I’ve added a reverse proxy configuration to nginx for the example app. It is using a different local domain and certificate, is running on the same machine, and is covered by the same root CA.
After adding my root CA to Ubuntu’s certificate store, adding my local domains to /etc/hosts, setting rejectUnknown to false in default.json, adding NODE_OPTIONS=--use-openssl-ca
to the document server’s .service file - I get this helpful error: “Download failed”
Here’s the reverse proxy config I have set for the example app. The document server itself is following the nginx configuration from the template as described by OnlyOffice’s documentation, and it’s running under the domain ooserver.local
and respective pem files.
server {
listen 443;
server_name ooapp.local;
ssl_certificate /credentials/ooapp.local/cert.pem;
ssl_certificate_key /credentials/ooapp.local/key.pem;
location / {
proxy_pass http://localhost:3001;
proxy_http_version 1.1;
proxy_cache_bypass $http_upgrade;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port $server_port;
proxy_read_timeout 90;
proxy_redirect http://localhost:3001 https://ooapp.local;
}
}
I am at a loss on what to try next. I was very much set on testing locally rather than uploading all my files to a staging server every time I want to test. Any help on this matter is greatly appreciated.
Addition: There are no helpful log messages. In fact, there don’t seem to be any log messages related to this issue at all.
Addition: The /track
url on the example app is getting requested, but I’m not sure yet what it responds with.