OnlyOffice cannot be reached

I have followed this tutorial:

My document server is up and running and is available through HTTPS. I just cannnot access any documents on my Nextcloud server via OnlyOffice.

I always get the error:
ONLYOFFICE cannot be reached. Please contact admin

F12 shows:
Failed to load resource: net::ERR_NAME_NOT_RESOLVED docservice/web-apps/apps/api/documents/api.js

I opened up every port on my Nextcloud and OnlyOffice machine that I can think of, I really don’t see what I’m doing wrong. I didn’t get any error when I added my OnlyOffice machine in Nextcloud, meaning HTTPS should work. I get: “Document Server is running” when I access it through HTTPS.

What am I doing wrong or forgetting?

Thanks in advance.


PS: Yesterday I managed to get it working following this tutorial, I had to reinstall everything and now I can’t get it to work.

PS2: wget https://mydomain/web-apps/apps/api/documents/api.js works, I can access it through the browser too.

FIX: couldn’t access api.js from my browser, but I could in incognito modus. Just clear all your temporary files to fix the problem.