How to set cname domain redirect to peertube

  • READ ME AND USE THIS TEMPLATE IF YOU WANT TO GET HELP ! You may ask your question in english or french, whichever is easiest for you… But please use one of the templates provided below :wink:
  • LISEZ-MOI ET UTILISEZ CE MODÈLE DE TOPIC SI VOUS SOUHAITEZ OBTENIR DE L’AIDE ! Vous pouvez poser votre question en anglais ou français, selon ce qui est le plus simple pour vous… Mais de préférence en utilisant l’un des deux modèles fournis ci-dessous :wink:

:uk:/:us: Message template (english)

The “support” category is meant to ask for help or troubleshooting related to installing or using YunoHost or its applications. It is not to ask assistance on general system administration, network administration or special use cases that goes beyond the scope of the project. If you wish to discuss more advanced use case, please post in the “Advanced Use Case” category.

Before posting, please :

My YunoHost server

Hardware: virtualbox
YunoHost version: 4.1.7.4 (stable).
I have access to my server : Through SSH
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no
If yes, please explain:

Hell,
I install peertube on my yunohost,
the domain name is logvid.ddns.net,
and I set a dns cname record
vid.logerp.com.tw to logvid.ddns.net,
but vid.logerp.com.tw redirect to yunohost admin panel,
does any one know how to setting ?
thanks!

If you have a CNAME record vid.logerp.com.tw. CNAME logvid.ddns.net., this will ensure that the domains vid.logerp.com.tw and logvid.ddns.net both point to the same IP address. But pointing to the same IP does not mean the same website/service is actually served from both domains.

Imagine Alice tries to visit https://logvid.ddns.net from her browser, on her computer. If we pretend that your server IP address is 1.2.3.4, here is what happens:

  1. Alice's computer to DNS server: :question: Hello, I am looking for logvid.ddns.net, do you know where that is?
  2. DNS server to Alice's computer: :white_check_mark: Yes I do, I have an A record for it, it is at 1.2.3.4, have a nice day!
  3. Alice's computer to 1.2.3.4 (your server): :question: Hello, I am looking for https://logvid.ddns.net, I believe you are the server serving this website?
  4. 1.2.3.4 (your server): :thinking: Oh yes, https://logvid.ddns.net is where I keep my PeerTube instance! I need to give it to Alice
  5. 1.2.3.4 (your server) to Alice's computer: :white_check_mark: Why yes, I have the website you are looking for, here you go! Gives Alice the PeerTube instance

Now imagine Alice tries to visit https://vid.logerp.com.tw from her browser, on her computer. If we pretend that your server IP address is 1.2.3.4, here is what happens on your current configuration:

  1. Alice's computer to DNS server: :question: Hello, I am looking for vid.logerp.com.tw, do you know where that is?
  2. DNS server to Alice's computer: :arrow_right: I have a CNAME record for it, it seems to be in the same place as logvid.ddns.net, you will have to ask for that. Have a nice day!
  3. Alice's computer to DNS server: :question: Hello, I am looking for logvid.ddns.net, do you know where that is?
  4. DNS server to Alice's computer: :white_check_mark: Yes I do, I have an A record for it, it is at 1.2.3.4, have a nice day!
  5. Alice's computer to 1.2.3.4 (your server): :question: Hello, I am looking for https://vid.logerp.com.tw, I believe you are the server serving this website?
  6. 1.2.3.4 (your server): :thinking: Hmm, it seems that https://vid.logerp.com.tw does in fact point to me, but I don’t seem to have any specific apps or websites installed here. I’ll just give Alice the YunoHost admin panel, I guess
  7. 1.2.3.4 (your server) to Alice's computer: :white_check_mark: Why yes, I have the website you are looking for, here you go! Gives Alice the admin panel

What you need to do is tell your server that whenever someone comes asking for https://vid.logerp.com.tw, they need to be given whatever is at https://logvid.ddns.net.
The simplest way to do this is to install the Redirect app on the root of https://vid.logerp.com.tw, with the redirect pointing to https://logvid.ddns.net.

When installing the app, you can choose between a visible rediect or an invisible proxy.

Here is how Alice’s browsing goes if you make a visible redirect from https://vid.logerp.com.tw to https://logvid.ddns.net:
Steps 1-5 are unchanged
5. Alice's computer to 1.2.3.4 (your server): :question: Hello, I am looking for https://vid.logerp.com.tw, I believe you are the server serving this website?
6. 1.2.3.4 (your server) to Alice's computer: :arrow_right: Oh, you are looking for https://vid.logerp.com.tw? Actually that was moved to https://logvid.ddns.net, you will want to ask for that
7. Alice's computer: :thinking: Oh, it seems what I want is actually https://logvid.ddns.net. Let’s change the URL in the browser address bar to https://logvid.ddns.net to reflect that
8. Alice's computer: :thinking: Let’s see, I just asked for the location of logvid.ddns.net a moment ago, I don’t need to ask again so soon, it’s almost certainly still at 1.2.3.4
9. Alice's computer to 1.2.3.4 (your server): :question: Hello, I am looking for https://logvid.ddns.net, I believe you are the server serving this website?
10. 1.2.3.4 (your server) to Alice's computer: :white_check_mark: Why yes, I have the website you are looking for, here you go! Gives Alice the PeerTube instance

Here is how Alice’s browsing goes if you make an invisible proxy from https://vid.logerp.com.tw to https://logvid.ddns.net:
Steps 1-5 are unchanged
5. Alice's computer to 1.2.3.4 (your server): :question: Hello, I am looking for https://vid.logerp.com.tw, I believe you are the server serving this website?
6. 1.2.3.4 (your server): :thinking: Hmm according to these instructions I have in my config files, whenever someone asks for https://vid.logerp.com.tw, I actually need to give them whatever is at https://logvid.ddns.net. So I need to give Alice the PeerTube instance
7. :white_check_mark: Why yes, I have the website you are looking for, here you go! Gives Alice the PeerTube instance

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