I see there are already redirections configured in
Let's stick to that, at it is the recommended location to make this configuration and remove the
In the port 80 virtual host change
RewriteRule ^(.*)$ https://%1$1 [R=permanent,L]
RewriteRule ^(.*)$ https://example.com/$1 [R=permanent,L]
example.com becomes your domain, without
www to avoid a second redirection).