Chrome redirects .dev to https

前端 未结 7 1296
萌比男神i
萌比男神i 2020-11-27 06:40

Suddenly Google Chrome redirects my virtual-host domain myapplication.dev to https://myapplication.dev. I already tried to go to

chrome://net-interna

7条回答
  •  心在旅途
    2020-11-27 07:26

    MacOS Sierra, Apache: After Chrome 63 forces .dev top level domains to HTTPS via preloaded HSTS phpmyadmin on my mac stop works. I read this and just edit /etc/apache2/extra/http-vhosts.conf file:

    
      DocumentRoot "/Users/.../phpMyAdmin-x.y.z"
      ServerName phpmyadmin.localhost
    
    

    and restart apache (by sudo /usr/sbin/apachectl stop; sudo /usr/sbin/apachectl start ) - and now it works on http://phpmyadmin.localhost :) . For laravel applications solution is similar.

    The nice thing is that using *.localhost top level domain when you set up new project you can forget about editing /etc/hosts.

    How cool is that? :)

    There's also an excellent proposal to add the .localhost domain as a new standard, which would be more appropriate here.

    UPDATE 2018

    Using *.localhost is not good - some applications will not support it like cURL (used by php-guzzle) - more details here. Better is to use *.local.

提交回复
热议问题