So, my konfigurasie is nou:
Listen 443 http
Listen 80
NameVirtualHost *:80
NameVirtualHost *:443
ServerName *:80
<VirtualHost *:443>
[some non-ssl stuff(directory, docroot)]
ServerName account.example.com
SSLEngine on
SSLCertificateFile /Users/myusername/certs/server.crt
SSLCertificateKeyFile /Users/myusername/certs/server.key
</VirtualHost>
<VirtualHost *:80>
SSLEngine off
[other stuff like docroot]
</VirtualHost>
Nie seker oor SSLEngine off
, maar nou werk dit.So, ek voeg herskryfreël by om van http na https in http vhost se .htaccess-lêer te herlei:
#Redirrect from http to https
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]