Win10 modify the hosts file and configure DNS

1, open the C: \ Windows \ System32 \ drivers \ etc directory

2, to remove the hosts file read-only attribute

3, add dns resolve configuration

127.0.0.1           www.example.com

4, refresh dns cache. Open cmd command line, type ipconfig / flushdns command.

ipconfig /flushdns

5, access http://www.example.com:8080/(hosts file is not ported, if you want to get rid of the port address, our services can be configured to port 80)

 

Guess you like

Origin www.cnblogs.com/zhi-leaf/p/12015784.html