Add domain to vanity URL

1. Caddy version (caddy version):


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
	handle @portainer {
	    @external {
		   not remote_ip
		respond @external 403

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 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 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 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.