Google Chrome Ignoring Hosts File

后端 未结 7 799
遥遥无期
遥遥无期 2020-12-16 08:41

Google Chrome is ignoring the settings in C:/Windows/System32/drivers/etc/hosts file. Both IE11 and Firefox are installed on the same machine and work as expec

7条回答
  •  被撕碎了的回忆
    2020-12-16 09:31

    A little late, but after hours i find a solution. It seems that Google Chrome sometimes has problems on recognize the name of the hosts defined en /etc/hosts.

    I'm using linux and i'm behind a proxy.

    Try adding at the end of the name server: .localhost

    Example:

    At: /etc/hosts:

    127.0.0.1       myservername.localhost
    

    On the virtual-hosts of your server configuration you'll need to rename the server name. In my case, i'm using apache so at /etc/apache/sites-enabled/myserver.conf rename the line of the old server name with:

    ...
    ServerName:  myservername.localhost
    

    If you are behind a proxy, you can except all the hosts just adding to the no_proxy vars:

    $no_proxy= "localhost"
    

    Finally don't forget to restart the server and try to access on the browser with the new server name.

提交回复
热议问题