'Why am I getting HSTS error in virtual host?

I have created a virtual host on my windows machine but whenever I enter the link I get an HSTS error: enter image description here

I am using XAMPP to run the PHP server. My configuration is as follows :

  1. The hosts file in C:\WINDOWS\System32\drivers\etc :

enter image description here

  1. The httpd conf file of XAMPP C:\xampp\apache\conf\extra\httpd-vhosts.conf

enter image description here

I have also tried this one :

enter image description here

PS: I have changed the port to 8080 before and I can connect to the application by using localhos:8080



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source