You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to find the right configuration to run a webserver and a Jenkins instance on the same machine. I also need to use subpaths for the routing instead of subdomains. In this case, I wanted to be able to reach the Jenkins instance by adding /ci to the domain name.
This is the docker compose I came up with, both following the Jenkins guides and the nginx-proxy docs.
I omitted some services and all networks and volumes.
Here is the output of docker exec reverse-proxy nginx -T: nginx-output.txt
For now I'm running this config on a virtual machine, so I've set HOSTNAME=localhost in my .env file.
The problem I am facing is that when I reach localhost/ci I get redirected to the Jenkins login page on localhost/login?from=%2F, which returns 404 as expected due to the fact that the /ci has been lost. Also, static assets in the HTML are referenced by /static/assets/... and they are not loaded correctly.
What am I missing for this use case? Is nginx-proxy capable of handling this use case at all? Do I have to write custom locations for the subpath? Or should I just try to move to a subdomain logic instead of subpaths?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone!
I'm trying to find the right configuration to run a webserver and a Jenkins instance on the same machine. I also need to use subpaths for the routing instead of subdomains. In this case, I wanted to be able to reach the Jenkins instance by adding
/cito the domain name.This is the docker compose I came up with, both following the Jenkins guides and the nginx-proxy docs.
I omitted some services and all networks and volumes.
Here is the output of
docker exec reverse-proxy nginx -T: nginx-output.txtFor now I'm running this config on a virtual machine, so I've set
HOSTNAME=localhostin my.envfile.The problem I am facing is that when I reach
localhost/ciI get redirected to the Jenkins login page onlocalhost/login?from=%2F, which returns404as expected due to the fact that the/cihas been lost. Also, static assets in the HTML are referenced by/static/assets/...and they are not loaded correctly.What am I missing for this use case? Is nginx-proxy capable of handling this use case at all? Do I have to write custom locations for the subpath? Or should I just try to move to a subdomain logic instead of subpaths?
Thank you 🙏🏻
Beta Was this translation helpful? Give feedback.
All reactions