skip to Main Content

I have already read Accessing localhost (xampp) from another computer over LAN network – how to?, but I couldn’t find an answer to my question.

I have setup custom domain(virtual host like how to create virtual host on XAMPP). The local IP of this PC is 192.168.1.9 and I access to it using http://sample.test.

Now I am on another PC and it local IP addresses is 192.168.1.8. How to access http://sample.test via this PC? Is it possible to configure this pc to access to the site just using http://sample.test because URL changes(Starting URL with IP Address) break the site.

Update : I am on Windows 10 PC

2

Answers


  1. As you are on a Windows 10 PC try editing your Windows hostfile, found at C:WindowsSystem32driversetc adding the line
    192.168.1.9 sample.test

    Login or Signup to reply.
  2. Edit host file in your client computer (Windows 10), it’s located on
    C:WindowsSystem32Driversetc.

    Add the ip and virtual domain like this and then save the file, you might have to run your text editor as administrator.

    ======= My Web App =======

    127.0.0.1 localhost

    192.168.1.9 sample.test

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search