How can I access a website on a Local Network in an OSX environment

1.8k views Asked by At

So I have a website that I created locally but I would like to have other team members access it. I would also like to test my site using my iPhone for testing purposes. Th thing is when I check the Xip.io (LAN only) option (shown in the image below) a URL is displayed in the empty box below it. The problem is that when I use that URL the Xip.io URL in the browser of my iPhone. Nothing displays. Is there an easier way to make my website accessible from other machines locally? Is there a file that I need to edit or are my changes correct?

Thanks

Update I'm using my internal IP. I can access my site with my laptop but other computers connected to my network cannot access my website. I figure that maybe I need to make a change to my httpd.conf file?

enter image description here

2

There are 2 answers

0
Mariton On BEST ANSWER

Found a solution! Since I'm working in OSX

Here are my steps:

  • Go to System preferences Selected Network
  • Select Wifi (since I'm connected via Wi-fi)
  • Clicked on the Advanced button
  • Click on the TCP/IP Tab
  • Copy or write down the IPv4 Address:

Then

  • Go to to PHPAdmin
  • Select the database tab
  • Select your database
  • clicked on the options table
  • under option_name Change both values (siteurl and home ) in column option_value to the IPv4 Address you copied from System preferences

  • Opened MAMP Pro

  • entered the same IPv4 Address in the Host IP Address Field
  • Restart server

Helped me

1
Terminator_NL On

I'm not sure if I understood correctly, but you can use the app Fing - network tools on your phone to scan the network and get all IP addresses on it, your computer should be one of them (on regular protection networks).

What I think what happened is that that URL is not resolved correctly on other devices, you are probably giving them your external ip, try to use the app I mentioned, find your computer and attempt to connect to the IP address you find in that app. That IP will be your internal ip address, which is what you need.