I have this working now on a zen cart install and wanted to make it work for my new store on Magento.
Now I have a ssl cert installed on my primarydomain.com.
I have my store in a add on domain and it can be seen either at addondomain.com or primarrydomain.com/addondomain/
In Zencart I can use https://primarydomain.com/addondomain/ and my site works fine and is under the ssl cert.
I can set it up in Magento using configuration/web and go to secure and enter the url but it does not work because the path is not there on a link going to my Account or login.
Is there another way to make Magento use paths that are correct. I am sure that index.php is getting the path and converting it to the correct one in code.