Hello.
I have a problem that I have not been able to resolve for two days with traefik. I have a docker-compose test project with a traefik service + a TLS key / certs generation service + an apache. The objective is to configure the traefik to:
- have a secure API on tls with basic_auth (work well for the moment but TLS not configured)
- have public.myapp.localhost thought http on port 80 (apache have a first vhost for that and works well if we test by the container ip). So this works and is normaly well configured
- have www.myapp.localhost + myapp.localhost throught https on port 443 (apache have a second vhost for that and works well if we test by the container ip)
To test apache by URL with the IP you just have to remember to change exposes to ports on the apache container on the docker-compose.yml side
I made a public github repo to bring you up: https://github.com/BeRoots/traefikable. Basically you will find the traefik logs in the 0_docker/0_docker_volumes/traefik folder. The bound configurations are in 0_docker as well as the docker-compose.yml.
In case you want to test:
git clone https://github.com/BeRoots/traefikable.git
cd traefikable
then docker-compose -f 0_docker / docker-compose.yml up -d
If anyone would tell me what's wrong for URL redirection. My problem seems my tls_middleware not work and redirect without changing the protocol to https.
Personally I did not understand why it does not take my redirect service if I use tls_middleware@file and I do not really understand this internal web-to-websecure@internal and the (noop@internal) service...
Thanks for advises.
PS. basic auth login and password for the dashboard are admin/admin