<VirtualHost _default_:80>
ServerName YOUR_SERVER
ServerAlias YOUR_SERVER_ALIAS 
 
ServerSignature Off

RewriteEngine On
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]

ErrorLog /var/log/apache2/redirect.error.log
LogLevel warn
</VirtualHost>
