Setup multiple apps on one domain

Hi everyone,

I'm looking for some advice on how to set up multiple apps using my registered domain. I've just set up a NextCloud instance which seems to be working well which is currently pointing to mydomain.net although I will be changing it to nextcloud.mydomain.net.

Is it possible to add other apps such as PiHole, Simplelogin, BitWarden & VPN's etc using subdomains? I've read that I may need to setup a reverse proxy, but I'm not sure where to start with this.

If anyone has any hints, tips or can point me towards a useful source I'll be greatfull!

1 Reply

That's correct, an NGINX Reverse Proxy will likely be your best bet. Although your exact configuration will vary, at it's most basic you can create your config file /etc/nginx/conf.d/$FILENAME.conf like this:

server {
   listen 80;
   listen [::]:80;

   server_name nextcloud.mydomain.net;

   location / {
      proxy_pass http://localhost:9000/;
   }
}

server {
   listen 80;
   listen [::]:80;

   server_name prometheus.mydomain.net;

   location / {
      proxy_pass http://localhost:9090/;
   }
}

Adding new server blocks for each subdomain that you need to proxy to $IPADDRESS:$PORT. As far as I'm aware, you can also split this up into individual $APPLICATION.conf files as long as the pathing/name of the file is correct.

You can then use Certbot to create SSL certs to enable HTTPS/secured connections to your applications.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct