In YunoHost, webapps reachability is managed by Nginx.
The basic way to do what youβre asking is to copy the Nginx configuration for Searx:
cp /etc/nginx/conf.d/searx.domain.org.d/searx.conf /etc/nginx/conf.d/xyz.onion.d/
nginx -t
yunohost service reload nginx # Do this only if "nginx -t" don't output an error
YunoHost is currently not made with Onion services in mind, and so it will try to redirect http://xyz.onion to https://xyz.onion with a self-signed certificate, despite the communication encryption included in the Onion system. To avoid this you may want to disable HTTP to HTTPS redirections in /etc/nginx/conf.d/xyz.onion.d/searx.conf and /etc/nginx/conf.d/xyz.onion.conf.
Be aware that these are advanced system modifications not supported by YunoHost, and that:
They are not meant to make your server anonymous.
The YunoHost diagnosis will trigger warnings if you modify /etc/nginx/conf.d/xyz.onion.conf.
Searx package upgrade will only update /etc/nginx/conf.d/searx.domain.org.d/searx.conf, not /etc/nginx/conf.d/xyz.onion.d/searx.conf.