diff --git a/data/templates/nginx/yunohost_admin.conf b/data/templates/nginx/yunohost_admin.conf index 0660eca46..bcd99493b 100644 --- a/data/templates/nginx/yunohost_admin.conf +++ b/data/templates/nginx/yunohost_admin.conf @@ -29,11 +29,14 @@ server { return 302 https://$http_host/yunohost/admin; } - # Block crawlers bot location /yunohost { - if ($http_user_agent ~ (crawl|Googlebot|Slurp|spider|bingbot|tracker|click|parser|spider|facebookexternalhit) ) { - return 403; - } + # Block crawlers bot + if ($http_user_agent ~ (crawl|Googlebot|Slurp|spider|bingbot|tracker|click|parser|spider|facebookexternalhit) ) { + return 403; + } + + # Redirect most of 404 to maindomain.tld/yunohost/sso + access_by_lua_file /usr/share/ssowat/access.lua; } include conf.d/yunohost_admin.conf.inc;