JFrog reverse proxy / context path 404 in CI
Requests reach the platform but hit a path the reverse proxy does not map, returning 404 or an HTML error page. JF_URL either omits the required context path or doubles it.
What this error means
jf commands fail with 404 or return an unexpected HTML/login page instead of JSON. Adding or removing /artifactory from JF_URL changes the outcome.
[Error] Artifactory response: 404 Not Found
<html><head><title>404 Not Found</title></head><body>
The requested URL /api/system/ping was not found on this server.</body></html>Common causes
Missing or extra /artifactory context path
Behind a reverse proxy the API lives under a context path. Omitting it (or doubling it) makes the CLI request a path the proxy does not route.
A platform URL vs Artifactory URL mismatch
The unified platform base and the Artifactory service base can differ; using one where the other is required yields 404s.
How to fix it
Set JF_URL to the base the proxy expects
- Confirm whether the API is served at the platform root or under /artifactory.
- Set JF_URL so the CLI builds correct API paths for your proxy.
- Verify with a ping that returns JSON, not HTML.
# platform base (JFrog cloud): https://acme.jfrog.io
# self-hosted behind proxy: https://artifactory.acme.com/artifactory
jf rt ping --url "$JF_URL"Align the reverse proxy config with the CLI expectation
Ensure the proxy forwards the context path Artifactory is configured for so the API and CLI agree.
How to prevent it
- Document the exact JF_URL (with or without context path) for your deployment.
- Verify with
jf rt pingthat responses are JSON, not proxy HTML. - Keep proxy context-path config aligned with Artifactory settings.