开发者

Changes to local hosts file lost

开发者 https://www.devze.com 2023-04-13 03:57 出处:网络
When staging websites locally, I edit my hosts file to point a given URL to localhost, so I can preview sites with the correct URL for link testing, etc.

When staging websites locally, I edit my hosts file to point a given URL to localhost, so I can preview sites with the correct URL for link testing, etc.

To do so, I ru开发者_如何转开发n

sudo vi /etc/hosts

then edit my file and save with :wq.

This works fine until I reboot. As soon as I restart, my changes are lost.

However, only changes I've made that reference localhost (like 127.0.0.1 www.somesite.com) are wiped out. Changes I've made to point to staging servers (like 555.555.55.5 www.anothersite.com) remain.

What am I missing here?

0

精彩评论

暂无评论...
验证码 换一张
取 消