Configuring Nextcloudpi reverse proxy nginx / apache / subdomain

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): nextcloudpi 1.52.4
Operating system and version (eg, Ubuntu 20.04): nextcloudpi 1.52.4

I am a bit useless. Please bear with me.

I have two Rpi’s

  1. mailserver with nginx and letsencrypt SSl cert (tld domain)
  2. nextcloudpi with apache and letsencrypt SSL cert (subdomain)

Both of these servers work on their own if I change my port forwarding on my router to the respective IP’s

I think I need to configure I reverse proxy. I have tried to google it but got confused. I just don’t know how to configure nginx and what I need to do to the nextcloud config.

I know I need to configure a server block on nginx but how I do that eludes me and what else I need to do.