[Redirect_ynh] Share your case examples and config

en
#1

Hello,
With @opi we have just updated the Redirect app.
This app adds a link on your user panel redirecting to another page or app. Some redirects can even be protected behind the SSO.

I have detailed some case examples and config types in the readme.

Feel free to share in this topic your use of this app (for Docker containers? External links? …) and the Nginx customization you had to do.

The idea behind this sharing is to (1) see how the app is used, (2) see if the nginx default config could be improved, (3) provide other users with customized Nginx files for certain apps.

Thanks and feel free to contribute :slight_smile:

1 Like
Configuration complémentaire de nginx comme proxy pour site plone auto-hébergé
Redirect apps --
#2

Personally, I have initially packaged this app to use it with Docker containers.
Currently, I use it to redirect (proxy+SSO) to multiple apps from a “Stealthbox” Docker container (couchpotato, deluge, sickrage…).

I also use it to create tiles redirecting (visible) to Owncloud apps (contacts, calendar…).

Recently, another user posted a customized Nginx for the “glowing-bears” app

#3

I have a server with a bunch of websites served by apache. I didn’t want to install yunohost directly on that host so I installed in a VM that sits behind a NAT on an internal (virtual) subnetwork. For now I am accessing the yunohost web server through some ssh tunnels.

Redirect app is helping me serve these existing websites (awaiting proper migration if/when possible).

This is how to automate the configuration :

  • login via ssh
  • write the list of domain names in in a text file
  • run the following bash loops (assuming 192.168.122.1 is the internal IP of your virtual machine host) :

    for i in `cat domains.list `; do yunohost --admin-password YOURADMINPASSWORD domain add $i; done

    for i in `cat domains.list `; do yunohost app install https://github.com/YunoHost-Apps/redirect_ynh --args "domain=$i&path=/&redirect_path=http://192.168.122.1&is_public=1&redirect_type=proxy" --label $i; done

then DNAT the 80/443 to your VM (192.168.122.Y) and your existing websites should be served via apache and nginx.

1 Like
#4

Will it be possible to redirect localhost:5290/http-bind to something like im.domian.tld/http-bind like Yunohost have ?
https://im.yunohost.org/http-bind

#5

Hi suppose, you just have to install redirect_ynh and then customize the nginx accordingly

#6

@scith
Thanks for the quick reply. It works \o/

#7

hello i need a reverse proxy https — HTTP

how do that please

#8

Hello,
I’m trying to redirect https//mon.domaine.org/libretime to an LXC container that runs on 10.0.3.200 an apache server with a website on /
With this configuration :

 location /libretime/ {
  proxy_pass        http://10.0.3.200/;
  proxy_redirect    off;
  proxy_set_header  Host $host;
  proxy_set_header  X-Real-IP $remote_addr;
  proxy_set_header  X-Forwarded-Proto $scheme;
  proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
  proxy_set_header  X-Forwarded-Host $server_name;
  proxy_set_header  X-Forwarded-Port $server_port;

  proxy_http_version 1.1;
  proxy_set_header Upgrade $http_upgrade;
  proxy_set_header Connection "upgrade";

  # Include SSOWAT user panel.
  include conf.d/yunohost_panel.conf.inc;
  more_clear_input_headers 'Accept-Encoding';
}

I can get the homepage but not the css file, the server is looking at https://mon.domaine.org/css/radio-page/radio-page.css whereas it is at https://mon.domaine.org/libretime/css/radio-page/radio-page.css.
Did I missed a parameter in the config ?
Thanks for any advice + this nice app

++
b

#9

It could be your app not understanding properly that its root URL is not your.domain.tld but your.domain.tld/libretime ? Like, some apps have this kind of parameter in their config files… Depends of how the app is built. (NB : by ‘app’ here, i mean your website)

#10

Hi,

Yes, thanks, it seems to be the good direction, now I manage to get the css if I modify the config file of the webapp, but the login button drive me to yunohost login page …

++
b

#11

Just tried and get Sonarr (sonarr.tv) to work thanks to ynh_redirect (sonarr is manually installed through the repo as described here

url : dedicated_subdomain.domain.tld
path : /
redirect_from (i forgot the real variable name) : http://127.0.0.1:8989
type: proxy

and it works \o/

As each and everytime, thanks to the amazing work. I couldn’t have easily configured a reverse proxy (the name and concept of which i discovered reading the readme and the forum) so easily and quickly

Ynh rocks :rocket:

1 Like
[request]radarr / sonarr + jackett
#12

Having a problem with Redirect, can’t get it to see SOnarr which is running on my Windows machine in the LAN. Redirect itself is running on Yunohost on a VM on the same pc. It just gives me a 502 error. I have tried all the different options and I have it working to redirect to a version of Ombi running on the same PC