开发者

substitution of someaddress.com on local desktop computer

开发者 https://www.devze.com 2022-12-26 01:26 出处:网络
Here is VDS server with ip(for example 105.123.123.123) with working apache service. And there is a desktop computer with linux on board(but really I presume there is no difference). I need to type o

Here is VDS server with ip(for example 105.123.123.123) with working apache service. And there is a desktop computer with linux on board(but really I presume there is no difference). I need to type on web browser address like someaddress.com and to see website situated at 开发者_如何学Cmy server. My /etc/hosts:

127.0.0.1       localhost
105.123.123.123  someaddress.com
105.123.123.123 www.someaddress.com

But it doesn't work. I see real someaddress.com website. What can be wrong. It will be great if you help me with that.

P.S. Why I need this. There is one project with fixed links(like someaddress.com/inf). And I need to test it.


Maybe your distribution is preferring DNS over values in /etc/hosts. Check /etc/nsswitch.conf. It should have a hosts line something like:

hosts: files dns

Just make sure files comes before dns.

0

精彩评论

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

关注公众号