I am setting up nextcloud at the moment. I got nextcloud itself up and running on a raspberry pi 4.
The next thing I want to do is setup reverse proxy to nextcloud from another raspberry pi 4 which is the reverse proxy using nginx. The other raspberry pi is proxying to nextcloud already. The only thing I am stuck with is how to keep https to nextcloud.
I created a certification with letsencrypt on the nextcloud pi and the proxy is checking on the ssl port for a connection. But whenever it is connected to the nextcloud page it is going back to http:// and not to https:// can anyone explain to me where I am going wrong?
Or is it that I need to keep the https (ssl) letsencrypt certificate on the first raspberry pi which is in charge for the reverse proxy?
I have searched google a few evenings to find a solution but I cannot find anything which helped to keep the https.
Correct but I am like better safe than sorry .
And if the encryption is available why shouldn’t be possible all the way to nextcloud itself.
So I need to copy the certificate files to the proxy raspberry and use them there in the nginx also if I am correct.
Any idea how to get it to work without https then?
If I forward it to nextcloud without it is showing not secured in the left in the top bar.
And a 404 not found when coming from the reverse proxy nginx
With this configuration I am up and runnin. To get ssl certificate from Letsencrypt you must comment out ssl and 443 ports and replace it with ports 80, after you get cert you get that config to default as its here from me.
Also if you CDN via Cloudflare make sure you have Full Strict SSL enabled otherwise youľl get redirect loops and other baddies.
For letsencrypt on reverse proxy, I am running it for all my domains without problems, dunno whats fraud by you…I need secured connection from LAN to WAN and opposite and its perfectly done with certbot and ubuntu 20.04.
Is it correct that with your configuration you can connect to nextcloud from outside the network?
Because my reverse proxy goes to the lan ip. And it will work internal but not when connecting from the outside.
It looks like you switched nextcloud conf and nginx reverse proxy conf in your comment is that correct?
Its not a problem however I call this myself a crossed backend and I had always problems with that. So for easier setup I have all runing on nginx and I dont need to hop from apache to nginx and opposite way when I have conf problems.
It looks like you switched nextcloud conf and nginx reverse proxy conf in your comment is that correct?
Nope its correct. Nginx.conf is general setup for nginx and nextcloud.conf is setup only for nextcloud. And yes I am able to get to my cloud from WAN because why have cloud when its only on LAN ?
Because my reverse proxy goes to the lan ip. And it will work internal but not when connecting from the outside.
I dont get this. But my reverse proxy in nextcloud.conf is poiting to LAN IP too, otherwise it wont work.
What I mean with that last part is, that the correct page layout is showed when the reverse proxy redirects me to the nextcloud ip. But when it is coming through reverse proxy it is shown as before.
Tried your configuration. But can’t get any clue on what you are doing there with those settings. and two different files. It is giving me errors that I cannot use it there like user and so on. How is your configuration layout exactly?