Redirect via Nginx from ip to a domain without www

Good control panel, questions about Nginx, but you need to understand how to implement this in hestiacp.
So far it turned out to set up Nginx redirect pages, through nginx.conf_redir, like
rewrite ^ / page1.html $ http: // redirect;
Debian 10 is installed: Nginx + php-fpm, there is https, only 1 joomla domain per ip. It doesn’t work with some redirects.
1.Need a redirect from www to a domain without www (Or maybe not alias www at all? But this is rather wrong).
2. Send ip address to the domain (without www).
3. It would be great to use Nginx to exclude several pages from the https protocol, leave 2-3 on the http protocol.
(from Redirecting WWW to NON-WWW (Nginx only) nothing works)