Hello again.
I have to correct one issue I misinterpreted. It’s about addressing of docker containers. I have stated they can be accessed via their container name. That was a misinterpretation on my behave, because I use the same name for the container as the service itself. The correct info on that is the service name.
In your case, this means for your Nextcloud container it is “app” and not “app-server” and “nginx” instead of “nignx-server”.
There is also an change regarding trusted_proxies in Nextcloud config. Now it it required to be defined with a IP address and optional with a range in CIDR notation. So you need to check your network stack while running the container and use that. Basically you connect to the container console and check the IP it uses (ifconfig). In my case that is for example 172.19.0.3, so I defined 172.19.0.1/32 as trusted_proxies.
If you change ports, you should check your nginx.conf again. I didn’t mention this before, but when you defined an upstream directive you should use it too. So far this was not really breaking anything, but when you changed ports, the correct use of that directive would be:
# Proxy ONLYOFFICE
location /ds-vpath/ {
rewrite /ds-vpath/(.*) /$1 break;
# Align protocol with your current configuration, from http to https
# proxy_pass http://onlyoffice/;
proxy_pass https://onlyoffice/;
proxy_redirect off;
So far, you have accomplished nothing changing the port to 81 this way. You simply have made everything worse. You need to rewrite the port inside the documentserver’s configuration, which you probably didn’t. You simply have only exposed port 81 which has no service defined. Your documentserver is still running at port 80.
Your Nextcloud’s config has this defined:
'onlyoffice' =>
array (
'DocumentServerUrl' => 'https://192.168.1.228/ds-vpath/',
'DocumentServerInternalUrl' => 'http://onlyoffice-document-server/',
'StorageUrl' => 'https://192.168.1.228/',
'jwt_secret' => 'secret',
),
This is an old definition, which is not used anymore. Today this is maintained by the connector app itself. I can’t tell if it is interfering (probably not) but it should not be there in the first place.
I hope you have a better understanding how NC, OO and your reverse proxy are interconnected. Correct usage of hostnames, ports does matter.
One thing I noticed is, that you have no mysql container defined in your compose file. As far as I remember, this is necessary when running nextcloud:fpm docker image. Just something I noticed. But maybe things have changed there.