i'm new to traefik.
i'm trying to do something basic, that i already do with nginx.
i have a subdomain, let's call it sub.domain.com.
i have a backend server, where an application (redmine, with bitnami on windows) is served at http://192.168.33.246:3003/service.
my problem is the following : i can access sub.domain.com/service but i can't get sub.domain.com directly pointing to 192.168.33.246:3003/service, even if loadbalancer server have /service in his url.
i may be missing something... tried for more than 3 hours, and i didn't find any solution...
Hello @boscorelly and thanks for your interest in Traefik!
The path configured in a load balancer server URL has no effect, as described in the documentation. To add a prefix to the request received by the client, it is possible to leverage the AddPrefix middleware.
By the way, to have the proxied application working, the resource's path returned by Redmine should not contain the
/service (some base path configuration might be needed in the application).
Hope this helps!
thanks for your answer !
i tried with addprefix, stripprefix, and it ends each time without it working.
there is already a reverse proxy with apache which is not needing /service to work.
when i call http://192.168.33.246:3003, i have this : Not Found: /
it works if i add /service to the url.
here is my apache configuration :
Alias /service/ "C:/BitNami/rubystack-1.9.3-13/apps/redmine_service/htdocs/public/"
Alias /service "C:/BitNami/rubystack-1.9.3-13/apps/redmine_service/htdocs/public"
ProxyPass /service balancer://redmineservicecluster/service
ProxyPassReverse /service balancer://redmineservicecluster/service
i want to do the same but... with traefik
maybe i'm wrlongly using traefik as not really a reverse proxy ?
(je m'exprime peut-etre mal aussi en anglais ahah)
Here is an example using docker-compose leveraging the addprefix middleware:
Then, when a request is made with curl like
curl http://whoami.localhost/path the response (which returns the request sent) is the following:
GET /service/path HTTP/1.1
And as expected the requested path is
Is it the behavior you are looking for?
it seems that this is adding the /service in the url, plus i get a 404. in my case, i don't want /service to appear at any time in the url
Page not found
The page you were trying to access doesn't exist or has been removed.
The example adds the
/service path to the request forwarded to the backend (not to the client request). This means that if a request is sent to
http://sub.domain.com/foo, the backend request will be sent to
If this is not the expected behavior,
could you provide an example (docker-compose) or try to explain your problem again?
i want to only use sub.domain.com (local ip address will act the same) and i dont want /service to appear at any time, like i can do with nginx