If your try to use SSL on Piwik in the normal way with a self-signed certificate an issue is that your certificat is not accepted by web browsers when your send your trackings query. And if you want to track your blog or personnal page a valide SSL certificate is very expansive. A solution is to use a configuration of your virtual host (maybe it can be done with .htaccess) and not the piwik option.
We will grant http access to piwik.php and piwik.js and force all other traffic to https. Your piwik is on piwik.mydomaine.com. Put in your Apache virtual host config :
<VirtualHost *:80>
[ your ServerName DocumentRoot etc. settings ]
# =================================================
# Rewriting and redirect settings for piwik.php et piwik.js
# =================================================
RewriteCond %{REQUEST_URI} !^/piwik.js$
RewriteCond %{REQUEST_URI} !^/piwik.php$
RewriteRule ^(.*)$ https://piwik.mydomaine.com$1 [R,L]
[ your directory settings ]
</VirtualHost>
And your General SSL settings :
NameVirtualHost *:443
<VirtualHost *:443>
[ your ServerName and DocumentRoot settings here ]
# =================================================
# SSL/TLS settings
# =================================================
SSLEngine on
SSLOptions +StrictRequire
<Directory />
SSLRequireSSL
</Directory>
SSLProtocol -all +TLSv1 +SSLv3
SSLCipherSuite HIGH:MEDIUM:!aNULL:+SHA1:+MD5:+HIGH:+MEDIUM
SSLCertificateFile /etc/apache2/ssl/piwikmydomaine.crt
SSLCertificateKeyFile /etc/apache2/ssl/piwikmydomaine-key.pem
SSLVerifyClient none
SSLProxyEngine off
SetEnvIf User-Agent ".*MSIE.*"
nokeepalive ssl-unclean-shutdown
[ your directory settings herer ]
</VirtualHost>
Hope it can be useful.