문제

I am trying Virtual Hosting on my Android Device. For this I edited hosts file on following path: /system/etc/hosts as:

127.0.0.1           localhost
192.168.69.65           myserver.test.com

But this change is not working for me. Still when I am browsing myserver.test.com from browser, it is showing some random results and not hitting the actual server(i.e. 192.168.69.65). On the other hand if I browse 192.168.69.65 directly it is working fine. Please suggest something.

Regardss, Rahul

도움이 되었습니까?

해결책

I found the solution. I need to put 1 empty line at end of file to make system to reload file like:

1.    127.0.0.1           localhost
2.    192.168.69.65           myserver.test.com
3. 

No need to restart phone at all, i can ping new hostname immediatelly. Thanks... :)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top