Wrong docker +onlyoffice to be used in .js file to load docx

docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
onlyoffice/documentserver 6.2.2 0714325e9cf7 5 months ago 3.04GB

input terminal
docker run -i -t -d -p 8423:80 --restart=always -v /data/onlyoffice/DocumentServer/logs:/var/log/onlyoffice -v /data/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data -v /data/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice -v /data/onlyoffice/DocumentServer/db:/var/lib/postgresql onlyoffice/documentserver:6.2.2

docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
0cf9c60ba0d5 onlyoffice/documentserver:6.2.2 “/app/ds/run-documen…” 34 minutes ago Up 20 minutes 443/tcp, 0.0.0.0:8423->80/tcp trusting_easley

after new DocsAPI.DocEditor in .js to load docx file in browse
wrong appears:
and the log is :
2024/01/02 16:57:08 [error] 6834#6834: *110 connect() failed (111: Connection refused) while connecting to upstream, client: 2.32.244.1, server: , request: “GET /6.2.2-21/doc/1704189933968/c/info?t=1704214629070 HTTP/1.1”, upstream: “127.0.0.1:8000/doc/1704189933968/c/info”, host: “2.46.150.224:8423”, referrer: “2.46.150.224:8423/6.2.2-21/web-apps/apps/documenteditor/main/index.html?_dc=5.5.1-76&lang=zh-CN&customer=ONLYOFFICE&frameEditorId=placeholder&compact=true?1704214524371”

the problem must come from here: 127.0.0.1:8000
but i don’t know how to fix,

in docker
cat /etc/nginx/includes/ds-docservice.conf

Allow internal service only from 127.0.0.1

location ~* ^(/[\d]+.[\d]+.[\d]+[.|-][\d]+)?/(info|internal)(/.*)$ {
allow 127.0.0.1;
deny all;
proxy_pass http://docservice/$2$3;
}

Hello @zhengjs

First of all, please note that you are using really outdated version of ONLYOFFICE Docs. I’d recommend updating it to the actual version and checking the situation afterwards.

In general, try using the IP address of your machine when accessing Document Server via browser.