Need help with reverse proxy confs for services that need their own root domain

My YunoHost server

Hardware: RPi 4.
YunoHost version: Official Pi image 4.3.6.2
I have access to my server : full access
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no
If yes, please explain:

Description of my issue

I’m not sure how yunohost actually handles other root domains other than its own main one. I installed petrolette for a news reader but it needs its own root domain so I created one within my DNS service (google domains) just as I did for yunohost. Also created one for petrolette.mydomain.com within yunohost and chose that domain for petrolette within the app interface on yunohost. My yuno instance is on an RPi 4 and every service I have installed currently works fine as it’s just given a directory within the yunohost root domain. I am running behind a nginx reverse proxy on another server within my LAN where SSL is terminated. My current nginx/sites-enabled conf on the proxy server looks like so:


   listen         443;
   listen    [::]:443;
   server_name    yuno.mydomain.com;

   location / {
        proxy_pass         https://192.168.57.203;
        proxy_redirect     off;
        proxy_read_timeout 60s;

        proxy_set_header          Host           yuno.mydomain.com;
        proxy_set_header          X-Real-IP       $remote_addr;
        proxy_set_header          X-Forwarded-For $proxy_add_x_forwarded_for;

        client_max_body_size 50M;
   }

   access_log /var/log/nginx/yunohost_access.log;
   error_log /var/log/nginx/yunohost_error.log error;
    ssl_certificate /etc/letsencrypt/live/yuno.mydomain.com/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/yuno.mydomain.com/privkey.pem; # managed by Certbot

}

Everything is good on that end to access yunohost and its apps within its directories. How should my proxy conf look for yunohost applications that need their own root domains? I tried creating another conf on the proxy server and changing ‘server_name’ to petrolette.mydomain.com and leaving the rest the same but that didn’t work. Any tips? Thanks

In Google domains you can set up a *.yourdomain.com record which covers any sub domain. The cert issue is wildcard too.

There’s also the possibility, I believe, of choosing the Yunohost urls which configure themselves. I think you can add a sub domain to one of the .fr/.me instances in terminal.

So in google domains I just have yuno.mydomain.com as a C record for mydomain.com. This works fine to get to the yunohost admin panel and its various directories. I used certbot on my proxy server to issue a cert for the domain via the config I posted above. I’ve also set up a C record for petrolette.mydomain.com.

So you are saying that the problem is within my DNS and I do not need a separate reverse proxy config for petrolette.mydomain.com?

Also can you expand on your second paragraph? I added petrolette.mydomain.com within the yunohost web interface and assigned it to the petrolette app. Is there something more I can do?

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