I'm trying to forward my phpMyAdmin docker container with Traefik from an internal 172.20.0.X address to a sub.domain.com/path directory. I'm using the latest version of Traefik along with the latest phpMyAdmin container.
It is my understanding that phpMyAdmin container serves the web frontend directly on port 80 at / .
I've got a basic SSL configuration of Traefik and am trying to use Docker labels to make / implement this. I've found some other tickets and Docs around explaining how to achieve this but most seem to be outdated for Traefik v1 and trying to translate this to Traefik v2 hasn't worked.
When I try accessing https://sub.domain.com/path, I'm able to see the Apache2 (from the phpMyAdmin container) 4040 Not Found page but can't access the application itself. (it's not the Traefik 404 page).
If I remove all mentions of the /path from the Router or the prefix middleware, I'm able to access and use phpMyAdmin on the sub.domain.com address. However my goal is to have it only show / respond from sub.domain.com/path address.
I'm still very new so I'm sure I'm not doing something correctly somewhere and appreciate any and all help towards understanding why this isn't working.
I've already done this, the PMA_ABSOLUTE_URI env variable doesn't modify or change the URL under which PMA is hosted on or under, it only manages the security when logging into the application to make sure you're using the right domain.
tl;dr: I've already done this, it doesn't change or do anything to Apache in the Docker container.
I've also experimented with the RemovePath middleware for the /path as well without any results.
The Github ticket you linked is, at least to my understanding of Traefik relavent for Traefik v1 , not V2 as I can not find a mention or use for the PathPrefixStrip that the above Github ticket users / mentions in Traefik v2.
Update, I went back in and did some tweaking. Your mention of the prefix and re-reading the docs made me realize that I had to StripPrefix along with using the PathPrefix suggestion you had earlier.
After setting these rules up and restarting the Container, I'm now able to access the container interface (phpMyAdmin web interface) by browsing directly to the https://sub.domain.com/path/index.php address.
However, going to the https://sub.domain.com/path address on its own just loads up a blank page with the right Page Title. I'm assuming I'm now missing something that tells Traefik to forward directly to index.php rather than just the root page which does / displays nothing.
Here are all my current container tags: (image to make to make it easier to visualize)
[HS] This is the reason i declare traefik rules separated from docker declaration, i can't proprely read the conf you've done without an headache [/HS]
About Strip-prefix, I encountered and error that i never fixed with my rutorrent docker when i'm accessing http://sub.domain.tld/rutorrent, i've a blank page. I'm forced to use http://sub.domain.tld/rutorrent/ with a slash to the end.
I can't show you cause it's BasicAuth protected but try to add / to the URL.
I assume there has to be some / or * somewhere that I'm missing to make the application directly accessible on the /path endpoint without having to add a / (so /path/) after to get it to work. It's a small inconvenience but something I'd like to figure out nether less eventually.
At least for now, I can access the container interface directly without too many issues on a /path/, I'd just eventually like to figure out how to get to it using just /path.
Thanks again!
I apologize for the Docker labels rather than the config, I'm in the reverse position where I struggle to understand the config explantations and am much more confident with understanding and setting up the labels for the containers themselves as I understand what each line does directly.