Nextcloud 22.0, Apache2.4, php-fpm8.0 .htaccess .user.ini problem

Fresh Ubuntu 20.04 and Nextcloud 22.0 installation , “Security & setup warnings” doesn’t find these rewrites. I red documentation and it says that php-fpm cannot read .htaccess which does have these rewrite rules.

How can i add these rewrite rules to .user.ini fle that php-fpm reads ? , copy/pasting from .htaccess didn’t work.

Your web server is not properly set up to resolve “/.well-known/webfinger”.
Your web server is not properly set up to resolve “/.well-known/nodeinfo”.
Your web server is not properly set up to resolve “/.well-known/caldav”.
Your web server is not properly set up to resolve “/.well-known/carddav”.

Also note to the developers, all documantation/guide links on that page points to some old pages which doesn’t exist:
Further information can be found in the
(https://docs.nextcloud.com/server/22/go.php?to=admin-setup-well-known-URL).

Hi @kimmo, have you try this line ?
sudo -u www-data php /var/www/nextcloud/occ maintenance:update:htaccess

( change the path of your nextcloud folder by yours)