OnlyOffice integration issue

Hi,
I have Nextcloud and OnlyOffice Document Server installed on the same server (OnlyOffice Document Server on a docker, internal docker port 443 and external 4443) with the same Certificate.

I can access them both from public network (Nextcloud: https://cloud.XXX.it/nextcloud - OnlyOffice Document Server: https://cloud.XXX.it:4443) and intranet (Nextcloud: https://192.168.XXX.YYY/nextcloud - OnlyOffice Document Server: https://192.168.XXX.YYY:4443).

I tried to configure the integration between Nextcloud and OnlyOffice Document Server with the following parameters:
Document Editing Service address: https://cloud.XXX.it:4443
Document Editing Service address for internal requests from the server: https://192.168.XXX.YYY:4443

But I have always the error Error when trying to connect (Bad Request or timeout error).

Please… help me!!! :sob::sob::sob:

which one is configured in nextcloud app settings?
full chain certificate for both server names?
selfsigned certificate?

I used this procedure https://robmclarty.com/blog/installing-letsencrypt-with-certbot for the generation of the certificate and then this procedure https://github.com/ONLYOFFICE/Docker-DocumentServer#running-onlyoffice-document-server-using-https for the integration.

probably you’ll find the answer here:
https://www.c-rieger.de/nextcloud-and-only-office-nginx/#second

make sure that you use the correct key and cert files. look at “Create a folder and copy your ssl data:”

what did you configure? the server name in the app must match the certificate. (external name)