-
-
Notifications
You must be signed in to change notification settings - Fork 113
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
Base path to reverse proxy #313
Comments
If you search the issues, there are many discussions on reverse proxies setup, Traefik etc. |
I've read many discusssions about this, but not really that issue. |
the app is listening on 80 and 443, you should be able to address this with NGINX without requiring modifications. What exactly are you trying to achieve? |
I try to have https://myowndomain/speedtracker |
With Traefik I can do that using a prefix after the domain. I guess it's doable also with NGINX if that's what you use, you don't need basepath on the app. |
@alexdelprete how you do this in Traefik? When using with nginx If I put this to nginx (basically app sees It will try to redirect to With older speedtest-tracker using environment key I also tried to use same env config with this one without success. Same thing when trying to use |
Same for me, it doesn't work. |
https://doc.traefik.io/traefik/middlewares/http/stripprefix/ |
what exactly doesn't work? Speedtest-Tracker is not a proxy, nor a webserver, it's a webapp. you can say something doesn't work when its documentation describes a feature, a configuration, and that doesn't work. this is not the case. your expectations about an app is not a bug. this webapp is listening on http/https ports, no path/subpaths, but on root. it's up to your reverse proxy to be configured like you want it to behave, in order to proxy correctly this webapp on root path. On Traefik StripPrefix can be used, on NGINX I have no idea because I never used it. Check NGINX documentation on how to achieve this and don't blame it on the webapp. Furthermore, I'm not the maintainer/dev, that would be @alexjustesen and he already closed the case because it's not a bug, it's something the reverse proxy has to manage. |
@alexdelprete This doesn't work, same redirect problem with traefik when using It tries to redirect to Base url has to be programmed into application, middleware/reverse proxy cannot fix this as far as I know. If you have working configuration, feel free to share. |
I don't tag it as a bug, tag was FEATURE and i think it's a real feature. |
Sorry, I tought you opened it as an issue, my bad.
I'm not the maintainer, you are confusing names.
This is not the old project, it's a new one. You can achieve what you want if you configure properly your reverse proxy, if your reverse proxy doesn't allow to do it, change proxy. |
@alexdelprete and that's the issue, this applies to If I had an API which calls When connecting to speedtest-tracker frontend tries to redirect to It also hardcodes assets path to And even on your stackoverflow link it's stated that it will only work if your application works like that:
Traefik isn't the solution here. Code changes are required to set correct base path. |
@alexdelprete i'm sorry, i misconfusing yours nicks |
It does...and that's the only way to make it work with Laravel, Laravel still doesn't officially support serving an app through subdirs. Luckily they merged this PR, which leverages X-Forwarded-Prefix. And Traefik's StripPrefix also creates that header exactly for these use-cases.
Sure you can, because Traefik sets Now I found out that the configuration of Laravel in Speedtest-Tracker didn't include the support of X-Forwarded-Prefix, so I'll try to include it and do some tests. |
our names...these are our real names, not nicknames. :)
check my reply above to Racle, with some technical details. |
@alexdelprete the bulk of the questions you seem to target are proxy related, espcially when dealing with Traefix. Would you be up for writing a section in the docs in extreme detail on how to setup reverse proxies and then how they can be used with Speedtest Tracker? Thinking we can eliminate a lot of these questions and issues if we get some good docs written. If you're interested we can connect on Telegram or Discord. |
Sure, I'd love to contribute, but first we need to address some issues about ST, in order to find the proper configuration of the project. I'm not a real expert but I love to share what I learned on these things while setting up my homelab, and I'm using Traefik. Let's connect on Discord: |
I don't understand why you refuse to accept a valid argument and a true problem. |
Because you don't read carefully, or you didn't understand what you read, so I'll be even more clear:
Got it now? Hope so. Regarding this other thing:
This is completely incorrect, so much so, that I won't even bother to comment, because it's clear you don't have a clear idea on how a webapp works. Let alone we're talking specifically of Laravel, so talking generically about javascript is totally nonsense.
At home, in my homelab, I use subdomains, why can't you? You should replace "can" with "don't want to do it" or "don't know how to do it". "Can't" is nonsense. |
Hi, |
|
@alexdelprete @alexjustesen Nginx.
|
It will be great if we could specify a base path through the docker environment, like this : -e BASE_PATH=/speedtest
The text was updated successfully, but these errors were encountered: