I have a problem with integrating document server to my domain, I have a balancer that forwards https to my machine, which is called sud.domain.com, onlyoffice document server is deployed on this machine via docker, I am trying to proxy requests to onlyoffice via a container.
After loading index_loader, nothing happens in the network tab
I use documentserver in conjunction with react
Below I will attach the nginx, docker compose configuration. Please tell me how I should act.
The first screenshot shows how I access documentserver via react
The 2nd screenshot shows the nginx configuration for proxying requests to the OO container
The 3rd screenshot shows the docker compose file
Hello there,
is your nginx-proxy on the same network-stack as your onlyoffice-container?
Can you access onlyoffice directly via http(s)://yourhost/onlyoffice/ ?
Yes, 2 containers with nginx and OO are in 1 network.
Yes, when I enter https/my.domain.com/onlyoffice/ in the search bar, a redirect occurs to https://my.domain.com/welcome/
, where I see a message that ONLYOFFICE Docs Community Edition is installed
below I will attach the necessary screenshots about the redirect and after which files exactly the launch of OO docservice stops (after index_loader)
![Снимок экрана от 2025-03-23 22-13-01|690x350(upload://pPKe2uXwXI3q5BSZndtfEMaC6WP.png)
Hello again.
It seems your setup is running. That is good. Let’s focus on our proxy then. I personally don’t know much about “react”. Proxying can be a little tricky thou. One character or one missing rule can make a huge difference. So I like to test things step by step.
Try to change your rewrite rule to this:
rewrite /onlyoffice/(.*) /$1 break;
And also try to run it with and without http_proxy_version set to 1.1:
proxy_http_version 1.1;
I also recommend to use those 2 rules, when redirecting from/to subfolders:
And just to be sure, reload the page in your browser with CTRL+F5 to force the browser cache for that particular address to be flushed instead of being reused.
Hello, thanks for ur answer , I tried your recommendations, but nothing worked, and sorry for the misinformation, but apparently if I enter https/my.domain.com/onlyoffice/ in the address bar, a redirect to /welcome occurs and I see nothing on the screen, no errors, nothing
The screenshot below shows what I see
thank you for the answer, there is nothing erors , no warns, no errors , even if I enter https/my.domain.com/non-existent address, it will be the same, most likely this is because I did not set up a 404 page.
and most likely https/my.domain.com/onlyoffice does not exist, but the redirect still occurs to /welcome/
and I also just saw that after loading api.js, OO
loads index_loader, but it turns out with the contents of my index.html
React App
You need to enable JavaScript to run this app.
but should be this
ONLYOFFICE Document Editor
.content-theme-dark {
--skeleton-canvas-content-background: #3a3a3a;
--skeleton-canvas-page-border: #616161;
--skeleton-canvas-line: rgba(255,255,255,.05);
}
But you did somehow reach your OO-installation before? You made a screenshot of the welcome page. If it’s getting redirected, that is a good sign already. But why it has no content now? We need to know that OO is up and running. Then it’s probably a proxy problem. As I mentioned before, I don’t deal with react, that I can’t help you with. Usually you can catch misconfiguration with Debugging-Console as you can see where you browser is being redirected or what sources/addresses it gets back from the host.
You are not inside a cloud-hoster by any chance … like cloudfront?
EDIT:
When you access “https://my.domain.com/onlyoffice/” you always get redirected to “https://my.domain.com/onlyoffice/welcome”. To test if onlyoffice is running and accessible without your proxy you can try to access OO welcome page directly via “https://host/onlyoffice/welcome” from inside your network behind your proxy. If necessary adjust to the correct port you expose it on, for example “https://host:port/onlyoffice/welcome”. Once we know things are ok with OO, we can figure out the necessary proxy configuration to access it.
Most people usually follow some tutorial or other instructions. Which instructions are you following?
Hello there, thanks for the answer , I decided to do it differently
and proxy to onlyoffice:8000, and my files started to download, but another problem with websocket arose, can you tell me what the problem is?
Hello again,
I’m not familiar with websocket errors. But from what I have seen, this should look like:
wss://my.domain.com/A.B.C-D/doc/...
where A to D correspond to the version of OO used. So it seems to me, this is again proxy connected.
I checked my own logs and my browsers debugging-console, and I don’t see anything related to websockets. But in my setup I run Nextcound and Openoffice on the same host in different docker-containers and I connect them via “ds-vpath” I have set up in my proxy configuration. This way my OO-container is not exposed to the outside world at all.
In terms of hosting Document Server behind a proxy I’d recommend checking out samples of proxy configuration that we provide here:
This article contains examples for different usage scenarios and for several most popular services. Take a look at the recommended configuration that corresponds to your environment and check out if your configuration is missing anything. It might help in resolving the proxy issue.