Host domain from Ionos on yunohost

My YunoHost server

Hardware: Computer on debian 10
YunoHost version: 4.3.6.2 (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

Description of my issue

Hello,
I come to you because i have some trouble setting up a simple website (u_u)

I’m on a debian buster with nginx.

I just bought a domain name on IONOS and i want to use it to create a my_webapp on yunohost (i created the website already, just have to link it to my server now)

Then, on Ynh admin panel, i added the domain and then changed the DNS on my registrar (Ionos/1&1) thanks to Yunohost diagnostic that told me what was wrong.
I then installed a my_webapp on this domain’s root and a let’s encrypt ssl on the webapp

I surely have done something wrong or forgot about something but i can’t access the website, it redirect me to Site builder | Create your own business or personal website | ownwebsite and leave me on a timeout page.

Here is my dns config from the command line “sudo yunohost domain dns-conf mydomain.com” :

Info: This command shows you the *recommended* configuration. It does not actual                                                                                                                                                             ly set up the DNS configuration for you. It is your responsability to configure                                                                                                                                                              your DNS zone in your registrar according to this recommendation.
; Basic ipv4/ipv6 records
@ 3600 IN A xxx.xxx.xxx.xxx

; Mail
@ 3600 IN MX 10 mydomain.com.
@ 3600 IN TXT "v=spf1 a mx -all"
mail._domainkey 3600 IN TXT "v=DKIM1; h=sha256; k=rsa; p=superlongkey
_dmarc 3600 IN TXT "v=DMARC1; p=none"

; Extra
* 3600 IN A xxx.xxx.xxx.xxx
@ 3600 IN CAA 128 issue "letsencrypt.org"

I tried restarting the networking service but i don’t really know what to do now.
Did i forgot to do something on Ionos ?

Thanks for the attention, have a great day

Obsidien

Hi,

Is your internet connection on a static IP address? Did you check whether the diagnostics match your IP and your settings at IONOS?

How do you access your Yunohost? Is it at home? Basically, the helpful questions that are in the edit box when you start a new thread :wink:

Unfortunately they did not select the right forum category, so they did not get the support template. I have moved the thread in the right category.

@ all, the “Tutorial and How to’s” category is meant for people providing tutorials, not for requesting support.


In addition to wbk’s questions:

I asked you in the chat about the results of the command ping <yourdomain> in your computer.

Info: This command shows you the *recommended* configuration. It does not actual...
This command shows you an example of what should be the configuration over at Ionos. It is not a display of the actual configuration.

If your domain still gets redirect to Ionos’ website builder, then yes, something is missing over there. Can you share a screenshot or a copy-paste of the configuration? You can hide sensitive information, but do so in a way we can understand what’s what (same IP addresses, domains, etc. in same colors, etc.)

1 Like

Sorry about the wrong thread category, i’ll pay more attention in my next posts…

Yes i have a static IP and my diagnostics match my local IP and my settings on IONOS.
I found that my problem is occuring when i try to access the website from my local connexion but from another network i can access it…

I asked you in the chat about the results of the command ping <yourdomain> in your computer.

Here it is :


PING mywebsite.fr (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.091 ms
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.094 ms
64 bytes from localhost (127.0.0.1): icmp_seq=3 ttl=64 time=0.092 ms
64 bytes from localhost (127.0.0.1): icmp_seq=4 ttl=64 time=0.016 ms
64 bytes from localhost (127.0.0.1): icmp_seq=5 ttl=64 time=0.091 ms
64 bytes from localhost (127.0.0.1): icmp_seq=6 ttl=64 time=0.080 ms
64 bytes from localhost (127.0.0.1): icmp_seq=7 ttl=64 time=0.093 ms
^C
--- mywebsite.fr ping statistics ---
7 packets transmitted, 7 received, 0% packet loss, time 128ms
rtt min/avg/max/mdev = 0.016/0.079/0.094/0.027 ms

And here is the pasted configuration from IONOS (with fake ips ofc)

Thank you all for your patience and help :slight_smile:

That ping is very surprising. Can you clarify your setup? Where are you browsing and pinging from? I have added the Support template into your first post, please fill in the blanks. On the chat you mentioned altering the /etc/hosts file, you should not do that BTW.

Is the site builder website you are redirected to somehow related to IONOS, or the software you used to build your webapp?

Sorry for the multiple questions, but I am grasping at straws trying to understand your setup.

I should be the one apologizing to not giving all the informations you need from the start :x

I filled the template as requested,

I pinged from my ssh connexion on my yunohost server as root. Since i’m pinging a webapp on the local network i guess it’s just pinging the localhost…
But pings from my personal computer on the website is giving me quite the same result except it’s not localhost and 127.0.0.1 but mywebapp.fr and ip 220.190.132.226

I indeed altered the hosts file, i found that if i didn’t it would not be possible for my website to be reached.
In fact i had to do this for all my apps, yunohost doesn’t seem to build the file for me when i install new apps… I thought it was the usual way

Well i’m not redirected to another site or a site builder, i’m redirected to https://mywebapp.fr/defaultsite
It’s just adding the /defaultsite instead of giving me the root index.
But it only happens from time to time, i guess there is an option to cut the connexion with Ionos

Now i really wonder why i cannot access mywebapp.fr from my local network …

1 Like

Did it ever work? Where did you change the hosts-file, on the Yunohost or on your laptop/desktop?

Your Yunohost is running at home, is it not?
There is a security function in many routers that prevents websites to be on an internal IP. Try having a look through search results for DNS rebind in the forum, to see if it matches your experience.

One of your DNS records attracted my attention. It is not related to your problem, but does not seem correct:
image

Could mywebapp/defaultsite be left over from the creation of your website?

All in all, it would seem there are three problems:

  1. Your site is not accessible from inside the LAN, but it is from outside
    1. Could be DNS rebind protection in the router
  2. There is a redirect from the root of your domain to defaultsite.
    1. Check nginx logs in /var/log/nginx , there might be quite a few. You can post a ls /var/log/nginx if there are too many to figure out where to start looking.
  3. Minor error in your DNS entries relating to XMPP that has no impact on your website

Finally: are you able to use the Yunohost user- and admin-web-pages? Or did you add the custom web app via SSH?

1 Like

Finally: are you able to use the Yunohost user- and admin-web-pages? Or did you add the custom web app via SSH?

I added the custom webapp through the yunohost admin pages, not from the command line.

My yunohost server is running on a different pc than my laptop and i access it via ssh.
I change the /etc/hosts file on my server to have the following result (truncated) :

# my_webapp_1
127.0.0.1       subdomain1.maindomain.fr
127.0.0.1       xmpp-upload.subdomain1.maindomain.fr
#my_webapp_2
127.0.0.1       subdomain2.maindomain.fr
127.0.0.1       xmpp-upload.subdomain2.maindomain.fr

# mywebapp (current webapp i'm talking about)
127.0.0.1       mywebapp.fr
127.0.0.1       xmpp-upload.mywebapp.fr

I do this to register all the subdomains and domains i add on the SSO.

I think i’ll search this way.
All my other webapps are fine, it’s just this one with the different domain bought on 1&1 that have this issue… i feel like i missed a config so maybe it’s dns exceptions.

This thread helped me check what was wrong.
Like you said, it was an artefact from the old site builder that redirected my users in case of page refresh.

If other domains are fine, but just this one is not, I would not expect the problem to caused by the router.

A temporary workaround could be to change the host file on your laptop, to reflect the internal IP where the server can be found.

Good find! So one problem is solved? Nice :slight_smile:

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