I'm running Artifactory CPP CE 7.7.3 and Traefik v2.2 using docker-compose
. The service is only available over http://localhost/ui/
. Now, what I need is an option which allows to add a URL path-prefix (eg http://localhost/artifactroy/ui
).
./templates/docker-compose.yaml
. [...] labels: - "traefik.http.routers.artifactory.rule=Host(`localhost`) && PathPrefix(`/ui`)" - "traefik.http.routers.artifactory.middlewares=artifactory-stripprefix" - "traefik.http.middlewares.artifactory-stripprefix.stripprefix.prefixes=/" - "traefik.http.services.artifactory.loadbalancer.server.port=8082"
With this I managed to access artifactory over http://localhost/ui/
.
I have multiple small services running on my server, each of this service is accusable via http://localhost/<service-name>
. This is very convenient and want to make clear that this URL is related to this service on my production server. Because of this, I want to have an URL like http://localhost/artifactroy/ui/...
instead of http://localhost/ui/...
I struggled getting artifactory setup in that way. I already managed to get a redirection from typing eg http://localhost/artifactroy/
to http://localhost/ui/
but this is not what I want on my production server.
http://localhost/artifactroy/ui/...
(Only partially successful, redirection didn't work afterwards)$JFROG_HOME/artifactory/var/etc
( Not successful)Is this even possible? Help is highly appreciated..
This example (even though not traefic example) gives you a direction to implement it. There are certain routes already used within the product. You need to add a context over and above it to ensure all comes via the new context path.
https://jfrog.com/knowledge-base/how-to-remove-artifactory-from-the-context-url-in-artifactory-7/
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.