Problem of deploying NC and OnlyOffice on the same computer

Faced the problem of deploying NC and OnlyOffice on the same computer
Initial data :
Ubuntu 20.4
NC 20.0.4
Web server Nginx
OnlyOffice in docker

NC is available at https://192.168.23.2 That is, on port 443

Deployed docker with image

onlyoffice / documentserver with 80 / tcp forwarding, 0.0.0.0:8443->443/tcp

Changed the “rejectUnauthorized” parameter in the container: false in the file

/etc/onlyoffice/documentserver/default.json

In sudo nano /usr/share/nginx/nextcloud/config/config.php file
Added line
’onlyoffice’ => array (‘verify_peer_off’ => TRUE,),

The container has restarted, but the page is not available at https://192.168.23.2:8443. How is it distributed across web servers? If the request is directed to https://192.168.23.2, then the main Nginx web server should respond, and if the request is directed to https://192.168.23.2:8443, then the web server from docker should respond, but I have a feeling that when When I call the page https://192.168.23.2:8443, the request is sent to the main Nginx web server, how can I check? Is it possible to change some settings of the Nginx server itself?
I tried deploying a docker container with OnlyOffice on a virial machine then everything worked there

this playbook will install nc & onlyoffice. you can use it as a reference installation to check the difference to your installation.

onlyoffice will only work if choose nginx as nextcloud web server.

don’t run the playbook on your installation to fix yours. that won’t work and break everything.

there is a container env parameter to achieve this.