-
-
Notifications
You must be signed in to change notification settings - Fork 169
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can I add custom routes to traefik? #328
Comments
@WinstonN The info here should be of help on this front: https://docs.warden.dev/configuration/multipledomains.html |
@davidalger I have used that document, and have a setup like this currently .warden/warden-env.yml version: "3.5"
services:
nginx:
labels:
- traefik.http.routers.${WARDEN_ENV_NAME}-nginx.rule=
HostRegexp(`{subdomain:.+}.${TRAEFIK_DOMAIN}`)
|| Host(`${TRAEFIK_DOMAIN}`)
|| HostRegexp(`{subdomain:.+}.localhost`)
|| Host(`localhost`)
|| HostRegexp(`{subdomain:.+}.localhost.test`)
|| Host(`localhost.test`)
|| HostRegexp(`testsubdomain.loca.lt`)
|| Host(`testsubdomain.loca.lt`)
|| HostRegexp(`127.0.0.1`)
|| Host(`127.0.0.1`)
php-fpm:
extra_hosts:
- localhost:${TRAEFIK_ADDRESS:-0.0.0.0}
- localhost.test:${TRAEFIK_ADDRESS:-0.0.0.0}
- testsubdomain.loca.lt:${TRAEFIK_ADDRESS:-0.0.0.0}
- 127.0.0.1:${TRAEFIK_ADDRESS:-0.0.0.0}
php-debug:
extra_hosts:
- localhost:${TRAEFIK_ADDRESS:-0.0.0.0}
- localhost.test:${TRAEFIK_ADDRESS:-0.0.0.0}
- testsubdomain.loca.lt:${TRAEFIK_ADDRESS:-0.0.0.0}
- 127.0.0.1:${TRAEFIK_ADDRESS:-0.0.0.0} When I open up
My development site loads correctly The problem I have is, using NGROK, or something like localtunnel, I always get a 404 - see image How can I log that 404 page? It seems like it's a traefik/nginx page |
That's a generic 404 response from Traefik when the request doesn't match any of the configured routers (i.e. set of labels). You'll want to verify the host header Ngrok and/or Lt is passing on matches one of the routers the shows up in the dashboard: https://traefik.warden.test/dashboard/#/http/routers (and if one of your routes doesn't show up, try re-creating the container |
I had some time to look into this, I logged out the request headers (using a simple node server)
I can see the host header is what it should be It's curious because the tunnel does reach my other node, django, apps @davidalger you wouldn't happen to know of a way to set the default traefik page (that shows the 404) to forward to |
The only observation I can offer is is the rules provided don't appear to cover |
@WinstonN , if you have any more findings regarding this issue, it would be great if you could share them. |
I'm not sure how to do this in warden, in theory it should work, but I haven't been able to get it working. Closing this issue |
Create a run_ngrok.sh script with the content from following the url: https://gist.github.com/sjb9774/7dd44d37c0001fd88ce4e1e819e2025b Make sure you've updated the last line with name of project from .env file. After that, run that script on your local. |
Have someone had any success with warden + ngrok? |
1 similar comment
Have someone had any success with warden + ngrok? |
Alguien pudo solucionar este tema ? si es así podrían compartir la solución ? |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
When I use NGROK, or localtunnel, to create a tunnel between my docker environment, and the internet, I always get a 404 page
This page seems to belong to traefik
I get the same page when I hit https://localhost:443
I want to ensure that when I use a service like localtunnel, and I set the local-host to the same as my local site, that I reach it and not a 404
an example command below
The text was updated successfully, but these errors were encountered: