How do I lead my standard domain and my www subdomain to a CMS for the world?

Hello everyone,

thank you very much for this great piece of software! The experience has been really nice so far, and Yunohost helped me a lot.

My YunoHost server

Hardware: VPS bought online
YunoHost version: YunoHost 4.3.6.3 (stable)
I have access to my server : Through SSH and through the webadmin
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no / I’m not sure what a special context is.
If yes, please explain:

Description of my issue

I’m using Yunohost on a VPS, and until now I had my applications either under the main domain mydomain.eu or under a subdomain like e.g. nc.mydomain.eu for NextCloud.

Now I’d also like to use a CMS application (Grav) in Yunohost, and what I would like to achieve is:

(1) If visitors come over https://mydomain.eu, they should see the CMS Website
(2) If visitors come over https://yh.mydomain.eu, they should see the Yunohost Login screen
(3) If users come over https://www.mydomain.com, they should be redirected to https://mydomain.eu, where (1) applies and they see the CMS website.

I have created all the subdomains with their DNS entries and their domain entries in YH, and got certificates for all of them. I also got to work points (1) and (2): mydomain.eu is my standard domain in YH. I made Grav the standard application for mydomain.eu, and the domain yh.mydomain.eu leads to the YH login page just because nothing else was set up for this subdomain.

But how can I get the additional www subdomain (3) to redirect to Grav? Is this possible in Yunohost? Do I need to edit the nginx config manually (can I even do that without interfering with YH)? Or is there an app for that? Is there maybe a simple “redirect” app that does nothing but redirect to a different domain or app on the server?

Thanks for any ideas
Halvar

You can use the redirect app from the app catalog. In its settings redirect to the domain name without the www, the type of redirection should be “for all” and for best experience use the proxy_pass.
You can test the other options

@jarod5001

Oh no, how did I not see this?
Thanks a lot for the help – that was exactly what I needed.

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