Stop https redirection for *.dev Virtual host set-up on windows 10 xampp

How to setup Virtual host on windows xampp

  1. navigate to xampp\apache\conf\extra directory
  2. open file “httpd-vhosts.conf”
  3. write following block of code
        DocumentRoot "path_to_xampp/htdocs/project"
        ServerName myapp.dev
    
    
  4. open notepad as admin
  5. click open navigate to “C:\Windows\System32\drivers\etc”
  6. select all files
  7. open hosts file
  8. write below code and save
    127.0.0.1 localhost
    127.0.0.1 lsapp.dev
    
  9. restart xampp server

Chrome and Firefox would redirect *.dev virtual host to https

As per report posted on¬†Google has purchased “.dev” domain and hence chrome and firefox are forcing all *.dev hosts to https and hence above process to create virtual host won’t work even though its right.

Solution to that is instead of giving *.dev to your virtual host provide like *.localhost and that would work.

I hope you have found your solution.

Leave a Reply