Add domain to vanity URL

1. Caddy version (caddy version):

v2.4.6

2. How I run Caddy:

In a docker container

a. System environment:

Docker on Synology NAS using a macvlan for networking

b. Command:

N/A the container is running, I need some config help.

c. Service/unit/compose file:

Not using Kubernetes

d. My complete Caddyfile or JSON config:

###Internal only app
	@portainer host portainer.familyds.org
	handle @portainer {
	    @external {
		   not remote_ip 192.168.0.0/16 172.16.0.0/12 10.0.0.0/8
		}
		respond @external 403
		reverse_proxy http://10.1.6.10:9000
	}

3. The problem I’m having:

I have a DNS server mapping FQDN’s to caddy which is serving as a reverse proxy. I would like to access an internal only server by a vanity URL. So for instance, I want to enter portainer/ in my browser and have it go to https://portainer.familyds.org. I’ve got a DNS search domain setup in my network. the request from my browser is making it’s way to caddy. However, I need caddy to append the .familyds.org to the URL so the HTTPS call works properly. How can I do that? Right now if I enter the vanity url of portainer/ I just get an ERR_SSL_PROTOCOL_ERROR error. However if I enter portainer.familyds.org it correctly adds HTTPS (via caddy) and the page loads. So somehow I need to get the domain name appended.

4. Error messages and/or full log output:

ERR_SSL_PROTOCOL_ERROR when accessing the vanity URL instead of the FQDN

5. What I already tried:

I’m not sure what to configure in caddy to add the domain name

6. Links to relevant resources:

What’s your entire Caddyfile?

What are in your logs? Check the Docker container logs.

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