Redirect to locally available service

Hi there!

My YunoHost server

Hardware: VPS rented online (at Contabo)
YunoHost version: 4.1.7.2
I have access to my server : Through SSH | through the webadmin
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no

Description of my issue

I’ve installed a bookmark manager via its docker image. I made it only locally available (because it didn’t seemed to work with SSL otherwise):

docker run --name linkding -p 127.0.0.1:9090:9090 -v `pwd`:/etc/linkding/data -d sissbruecker/linkding:latest

I testet the availability via ssh and curl and on the command line everything seems to work: the service is available at 127.0.0.1:9090 – but not via the server’s public ip.

But: I want to expose the service to the internet. So I use the redirect app and set up an invisible proxy to my.doma.in/subfolder of one of my domains. When I open it in the browser, it keeps throwing me back to “main-doma.in/yunohost/sso/”, even though I explicitly made the redirect available also for non-logged-in users.

Does anybody have an idea where my mistake is and how I can fix it? Thanks!

Hi Juekr,

Could you post the details about how you set up the redirect app ?

Thanks !
Charly

Sure thing!

Let me check on the forum in french, I’m sure someone must had faced the same issue.

But first of all, check in the user mune of yunohost that “visitors” and “everyone” is allowed to visit the redirect_app.

And second thing, can you create a specific subdomain for this app ?
Instead of save.ox0.de/bookmarks
you would have bookmarks.save.ox0.de

Let us know if it works,
Thanks

The redirect app gives permission to visitors and users. I’ve just checked that (the app is mentioned in both lists). And yes, there is a specific subdomain but I have more apps on that – so I use different folders as well.

Appreciate your help, let me know if you find anything in the French section. Thanks!

Edit: Sorry, I misread. I could create another subdomain as well, but would this even work? A subdomain on a subdomain?

Hi,
I just red your edit.

It would definitely work, but you have to create the record on your DNS, or to add the domain in Yunohost as well (and also générate the certificate).

Then, you could install the bookmark app at the root of this (sub)domain.
It means that whenever someone would go to http://bookmarks.save.ox0.de, the visitor would land to your bookmark app.

Let us know if it works.

See you

Funnily enough, this works. But I don’t really get why. The only difference is that now the redirect is in the root of its (sub)domain – but shouldn’t it work exactly the same way when using a subfolder instead?

Yeah, I guess, my problem is kinda solved … but I still hope that someone can enlighten me. :wink:

Thank you very much for the help!

Hi Juekr,

It’s explained on the page of the app GitHub - YunoHost-Apps/redirect_ynh: Redirection app for YunoHost

WARNING: Many apps do not support being redirected to a different path due to relative links! This means that some apps being hosted for example on http://127.0.0.1:5050/app/ HAVE TO be redirected to http://domain.tld/app/ and NOT http://domain.tld/someotherapp/

Concrete example: the Odoo Docker container runs on http://127.0.0.1:8069/. You will not be able to redirect it to http://domain.tld/odoo/ ! You have to redirect it to the root, so for example http://odoo.domain.tld/

Glad that your issue is solved !
See ya

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.