Impossible de déplacer une application en racine d'un nouveau domaine / Can't move an app at a domain's root

My YunoHost server

Hardware: VPS bought online
YunoHost version: YunoHost 4.2.8.3 (stable).
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

Hello !

I have a wordpress that I had installed on my main domain (domain.ltd/WPtest access).
I bought a domain name, added it in YunoHost, copy/pasted the recommended DNS configuration inGandi.net and added the Let’s encrypt certificate.

This afternoon I tried to move the WordPress to the root of the new domain using the graphical tool. The operation apparently went well (no error message) but impossible to display the WordPress correctly, it displayed “page was not redirected correctly”.
I tried to restart the server, but this did not solve the problem.

I then tried to redo the operation but adding /site (newDomain.ltd/site) and it worked!

Then I tried to move the WordPress to the root again: it didn’t work anymore, same error message as before.

For the moment I put the WordPress back on the new domain with /site but I absolutely must be able to put it in root…

Any idea what is causing the problem?

Thanks in advance for your help!


Mon serveur YunoHost

Matériel: VPS acheté en ligne
Version de YunoHost: YunoHost 4.2.8.3 (stable).
J’ai accès à mon serveur : En SSH | Par la webadmin
Êtes-vous dans un contexte particulier ou avez-vous effectué des modificiations particulières sur votre instance ? : non

Description du problème

Hello !

J’ai un wordpress que j’avais installé sur mon mon domaine principal (accès en domain.ltd/WPtest).
J’ai acheté un nom de domaine, je l’ai ajouté dans YunoHost, copier / coller la configuration DNS recommandée chez Gandi.net et ajouté le certificat Let’s encrypt.

Cet après-midi j’ai essayé de déplacer le WordPress en racine du nouveau domaine en utilisant l’outil graphique. L’opération s’est apparemment bien déroulée (pas de message d’erreur) mais impossible d’afficher correctement le WordPress, j’avais une page “la page n’a pas été redirigé correctement”.
J’ai tenté un redémarrage du serveur, sans que cela résolve le souci.

J’ai ensuite essayé de refaire l’opération mais en ajoutant /site (newDomain.ltd/site) et là ça marche !

Dans le doute j’ai essayé de déplacer de nouveau le WordPress en racine : ça ne marche plus, même message d’erreur qu’avant.

Pour l’instant j’ai remis le WordPress sur le nouveau domaine avec /site mais il faut absolument que je puisse le mettre en racine…

Une idée de l’origine du souci ?

Merci d’avance !

This is a bit tricky to investigate, but assuming you’re sort of comfortable with computer I would :

  • try to redo the operation
  • check what happens when you try to access the url with the Network tab opened (c.f. F12 on Firefox)

One possible explanation may be that you defined the app as “default app” in the past - there’s an annoying buggy/hackish implementation for this feature and you’ll end up with an old redirection in /etc/ssowat/conf.json.persistent which gotta be removed manually

1 Like

Hi @Aleks,

Thanks a lot for your time.

I tried to redo the opération, here’s the export of the network tab when trying to access the website : hastebin

Here is the content of the file conf.json.persistent :
image

[edit : following Weird redirection on a Custom Web App (Wordpress) install after changing the app URL - #4 by Aleks i tried to empty conf.json.persistent but it didn’t change anything :

image

So the best i managed to do so far :

  • empty conf.json.persistent
  • move the app to newDomain.ltd/wp
  • click the button “Redirige la racine du domaine vers cette application / Redirect domain root to this app”

Which is working as expected : if you enter newDomain.ltd in the adress bar you are redirected to newDomain.ltd/wp

Content of conf.json.persistent :
image

@Aleks it’s “better” but any idea how to achieve putting the app directly on newDomain.ltd ? :sweat_smile:

So I would definitely remove the redirection like you did in conf.json.persistent

Then move the app to the root

Then be sure to force the browser cache refresh when acceding to your.domain.tld

If that still doesn’t work, investigate what’s happening with the Network tab in Firefox (or Chrome)'s developer tools (F12)

Hi @Aleks,

I didn’t have time to test in the past few days but I will do as soon as possible, sorry.

Not sure I will be able to understand the result of the network tab by myself so what is the best way to share the result with you? (apparently I can save the content of the tab in a .har file: is it useful?)

Eeeh sure, I don’t know about .har … would prefer just a simple screenshot I think

Well .har seems pretty useful for “debugging” someone else : from my network tab in Firefox I can export the results in .har and you can import the file in your network tab to visualize exactly the same content.

Here is what i got last time with the WordPress on the root and no redirection in conf.json.persistent (and I’m pretty sure I used ctrl+F5) :

(and if you want to give a try to .har, here is the corresponding file)