diff --git a/conf/nginx.conf b/conf/nginx.conf index 596bb72..288d231 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -26,12 +26,14 @@ location __PATH__/ { include conf.d/yunohost_panel.conf.inc; } -location ^~ /.well-known { - +# redirect the account_domain .well-known to the domain one +location = /.well-known/webfinger { if ($is_account_domain = 1) { - location = /.well-known/webfinger { return 301 __PATH__/.well-known/webfinger; } - location = /.well-known/nodeinfo { return 301 __PATH__/.well-known/nodeinfo; } + return 301 __PATH__/.well-known/webfinger; + } +} +location = /.well-known/nodeinfo { + if ($is_account_domain = 1) { + return 301 __PATH__/.well-known/nodeinfo; } - - try_files $uri $uri/ =404; }