typing these into the domain config in binding section takes care of it. the binding section only listens to port 80 and does not redirect to https. when I do these, there is no problem.
aapanel directory bind setup or script have to add these lines to the config;
listen 443 ssl http2;
#HTTP_TO_HTTPS_START
if ($server_port !~ 443){
rewrite ^(/.*)$ https://$host$1 permanent;
}
#HTTP_TO_HTTPS_END