Dear Community,
i´ve been struggling with setting up a new Nextcloud AIO in the following environment:
Internet → NGINX Reverse Proxy → Nextcloud AIO with NGINX ProxyManager
The NC setup is done and i can reach the cloud from internal network without any issues, via http://ip:11000 for instance which redirects me to https://cloud.mydomain.com. From external networks i just get “502 Bad Gateway” from the Reverse Proxy.
My problem is the first NGINX Reverse Proxy. I tried several different configs but somehow the NGINX is always redirecting to https://ip:11000 instead of http://ip:11000 and i have no explanation for it. There are other machines in this Proxy configured, some of them are also using proxy_pass http:// and they are working.
Here is the site actual site config:
server { listen 443 ssl; http2 on;
server_name cloud.mydomain.com;
client_max_body_size 0;
location / {
proxy_pass http://192.168.XX.XX:11000$request_uri;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
And here is what the ReverseProxy logs when i try to reach NC from the outside:
2024/10/28 17:41:30 [crit] 34#34: *739 SSL_do_handshake() failed (SSL: error:0A0000C6:SSL routines::packet length too long error:0A000139:SSL routines::record layer failure) while SSL handshaking to upstream, client: 84.XX.XX.XX, server: [cloud.mydomain.com](http://cloud.mydomain.com), request: "GET / HTTP/2.0", upstream: "https://192.168.XX.XX:11000/", host: "[cloud.mydomain.com](http://cloud.mydomain.com)"
As you can see it redirects to https which is not working.
The NGINX Proxy Manager holds a vaild wild-card certificate and has configured a Proxy Host redirecting cloud.mydomain.com to http://ip:11000.
Any ideas how to get this working from the outside?
Greetings