I'm experiment at home, I have 2 computers, and on one of them I published website, which I would like to access from another computer, And I've did next:
1.) Added new website on IIS 2.) Browsed to my website files 3.) Wrote on system32/drivers/etc/hosts
127.0.0.1 and added my hostname
And with this settings everything worked on computer that used as server
But when I tried to access it from my client computer it did not worked, so I had to change bindings of my website I entered IP address of my machine in bindings like this:
And after I did this I was able to access from another computer but I had to edit hosts file and change 127.0.0.1 to 192.168.1.201, but because in my hosts file (on hoster - server machine) stayed 127.0.0.1 even if I am hoster I couldn't access my website and my client ( another computer ) could because on client I wrote in hosts 192.168.1.201, and I'm wondering why it didn't worked when I'm hoster, 127.0.0.1 represent my localhost?
*
Why do I need to write my own IP (192.168.1.201) in my own hosts file to open a website on my own machine, I understand doing this on a client machine and that is ok, but I don't understand why I had to do this on machine where app is published.. I thought I can leave 127.0.0.1 and everything would work..
*
This is how it looked :
Thanks a lot Cheers
Aucun commentaire:
Enregistrer un commentaire