Understanding Traefik

I followed the tutorial at:

I initially set it up just to use with the subdomains as outlined in the tutorial (Portainer and Traefik), but left my Wappler target URL as the main (i.e. https://domain.com) with no port number.

This resulted in an error message being displayed when accessing the main domain:

Too many redirects occurred trying to open

After googling this error and going back and forth with Cloudflare and Amazon, I gave up for a few days to unwind and think things through.

So, today I went back through the tutorial and followed it step by step with a subdomain in the Wappler target URL, and of course, it worked! :slight_smile:

Now my question is why do I have to use a subdomain as my web URL to make this work? I ask because having a subdomain is not ideal. I am not referring to the portainer.domain.com or traefik.domain.com, but rather the sub.domain.com in the Wappler Target URL. From reading the documentation on Traefik, I could not find anything that required the domain URL to be a sub, rather from what I could see, it referred to the domain URL as a main.

Secondly, if the use of a subdomain is required, how would I redirect users from the main domain to the subdomain for ease of use? I am using the Docker with Amazon EC2 setup, so I am not sure that if I would have access to the main domain to set an .htaccess file or index redirect if I have to use a subdomain.

Finally, other than incorporating Let’s Encrypt and being required to make Portainer work, what is Traefik used for exactly. To be honest, reading the documentation was a little above by head.

Community Page
Last updated: