Your http redirect should be set up on your port 80 virtual host, whilst your authentication configuration should only be added to your port 443 virtual host.
For example:
<VirtualHost *:80>
ServerName www.server.com
DocumentRoot /var/www/site
<Directory /var/www/site>
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</Directory>
</VirtualHost>
<VirtualHost *:443>
ServerName www.server.com
DocumentRoot /var/www/site
<Directory /var/www/site>
Options FollowSymLinks MultiViews
AllowOverride none
Require all granted
</Directory>
<Location />
AuthType Basic
AuthName "Password Protected Area"
AuthUserFile /srv/users/serverpilot/apps/intranet/public/.htpasswd
Require valid-user
</Location>
</VirtualHost>
Actually, having thought about it, because we know that all port 80 (non-https) accesses are to be redirected, we can simply do that more directly like this:
<VirtualHost *:80>
ServerName www.server.com
RedirectPermanent / https://www.server.com
</VirtualHost>
Then just use the port 443 virtual host as above.
To achieve something similar using only .htaccess settings this works:
SSLOptions +StrictRequire
SSLRequireSSL
SSLRequire %{HTTP_HOST} eq "www.server.com"
AuthType Basic
AuthName "Password Protected Area"
AuthUserFile /var/www/site/.htpasswd
Require valid-user
ErrorDocument 403 https://www.server.com/
ErrorDocument 404 https://www.server.com/
The major downside to this is that you'll always be redirected to the home page (or wherever your ErrorDocument directives point to). The Apache website mentions (see here) that you can use a script as your ErrorDocument and that it is passed the original request URI, although when I tried this on Apache 2.4 it didn't seem to work that way.
Also, any settings in the main VirtualHost configuration might mess with this approach. Unfortunately .htaccess is quite restricted in comparison to the main server configuration.
The only other thing I can suggest is that if you don't need the whole site to be secured, you could set up your authorisation directives in another .htaccess file in a sub-directory.
Check out this site for some really good information on using .htaccess files