Can not use each subdomain to map each folder with caddy

1. The problem I’m having:

My server server application on port 3000. Now, I want to

  • Map each subdomain of the application to a dedicated IP address
  • Create a unique subdomain folder under …/public/subdomain for each subdomain that is only accessible via the subdomain
    I can not find any suitable solution to fix this. Please help

2. Error messages and/or full log output:

PASTE OVER THIS, BETWEEN THE ``` LINES.
Please use the preview pane to ensure it looks nice.

N/A

3. Caddy version:

v2.6.4

4. How I installed and ran Caddy:

a. System environment:

Ubuntu 22.04 server

b. Command:

PASTE OVER THIS, BETWEEN THE ``` LINES.
Please use the preview pane to ensure it looks nice.

c. Service/unit/compose file:

PASTE OVER THIS, BETWEEN THE ``` LINES.
Please use the preview pane to ensure it looks nice.

d. My complete Caddy config:

PASTE OVER THIS, BETWEEN THE ``` LINES.
Please use the preview pane to ensure it looks nice.

5. Links to relevant resources:

Use the bind directive.

Configure the root for each subdomain.

1 Like

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