Found the answer. In the file xampp\apache\conf\extra\httpd-ssl.conf
, under the comment SSL Virtual Host Context
pages on port 443 meaning https is looked up under different document root.
Simply change the document root to the same one and problem is fixed.