How do i add other self hosted sites?

1. The problem I’m having:

I just installed Nextcloud AIO, and it’s the first time I’ve used a domain name to host something locally with a reverse proxy. And I was wondering how I add other domains to the Caddyfile.

My Caddyfile is:

{
        admin 0.0.0.0:2020
}

https://nc.sceptic.au:443 {
        tls internal
        reverse_proxy localhost:11000
}

And the other sites will be like : linkding.sceptic.au and so on.

How would I edit the Caddyfile to make these available locally with a certificate, just like nextcloud aio?

3. Caddy version:

If you installed Caddy as a Linux package, run caddy version.
v2.7.6

4. How I installed and ran Caddy:

I installed caddy this way Install — Caddy Documentation

a. System environment:

Distributor ID: Ubuntu
Description: Ubuntu 23.10
Release: 23.10
Codename: mantic

Client: Docker Engine - Community
Version: 25.0.1
API version: 1.44
Go version: go1.21.6
Git commit: 29cf629
Built: Tue Jan 23 23:09:35 2024
OS/Arch: linux/amd64
Context: default

Server: Docker Engine - Community
Engine:
Version: 25.0.1
API version: 1.44 (minimum version 1.24)
Go version: go1.21.6
Git commit: 71fa3ab
Built: Tue Jan 23 23:09:35 2024
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.27
GitCommit: a1496014c916f9e62104b33d1bb5bd03b0858e59
runc:
Version: 1.1.11
GitCommit: v1.1.11-0-g4bccb38
docker-init:
Version: 0.19.0
GitCommit: de40ad0

b. Command:

The answer is as follows:

{
    admin 0.0.0.0:2020
}

https://nc.sceptic.au:443 {
    tls internal
    reverse_proxy localhost:11000
}

linkding.sceptic.au {
    # Configuration for site1
    tls internal
    reverse_proxy localhost:PORT_FOR_SITE1
}

sonarr.sceptic.au {
    # Configuration for site2
    tls internal
    reverse_proxy localhost:PORT_FOR_SITE2
}
1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.