For both your configure.php files, use https://www.mydomain.com and http://www.mydomain.com in the relevant sections.