Hi,
I have two servers in my LAN, say A (192.168.1.10) and B (192.168.1.11). A is the one the router points incoming traffik on ports 80 and 443 to. A is an Apache webserver, B is a webserver running traefik docker with ports 80 and 443 exposed internally, in which runs an httpd docker on the same traefik docker network. I created a domain, say xxx.ddns.net, configured apache .conf file on A and I would like to redirect the http request to B where traefik has its letsencrypt certificate for that domain. Http traffik from A to B works well, whereas https fails.
Any idea? Or am I compelled to have SSL certificate on A and then proxy to B where service is hosted?
Thank you in advance
hello @kantiano
Is there any specific reason why you are not using Traefik as the main router (reverse proxy) running on A host?
The easiest way would to have the following scenario:
client --- (HTTPS)--->. Traefik (A)----(HTTP)---> Apache (B)
On Traefik you can configure routing using e.g. file provider that points to the Apache server with your deployed application.
Traefik has been designed to act as the edge router, the main gateway to your infrastructure so the best option is to deploy on A considering your example.
Having such a configuration you can configure the TLS certificate on Traefik and then pass the request to the backend using HTTP. This is a typical solution for most of the use cases.
Let me know your thoughts.
Thanks,
1 Like