-1

I have a local php(Laravel) server. I can access the domain "mydomain.dev" from an simulator but it does not work when I try to access it from a real device. I have the app running with the device connected to the same wifi network but it still does not work.

Eric Aya
  • 69,000
  • 34
  • 174
  • 243
user2636197
  • 3,782
  • 9
  • 44
  • 67
  • Have you tried this already? http://stackoverflow.com/questions/30675025/access-to-laravel-5-app-locally-from-an-external-device – Duikboot May 16 '16 at 01:08
  • Please post you code it will be useful to recognize your question – Willie Cheng May 16 '16 at 01:09
  • Does the DNS server that your iOS device is connecting to know how to resolve `mydomain.dev` to the IP address of your local server? If not then you will need to fix this – Paulw11 May 16 '16 at 01:36

2 Answers2

0

Open your command prompt/terminal Type

windows ipconfig

linux ifconfig -a or ip addr show

write your IPv4 adress

exemple (windows)

enter image description here

Then Run your server php artisan serve or whatever you are using (wamp/laragon or easyphp ..etc)

then go to your browser in your phone and navigate to mydomain.dev

This should work.

Achraf Khouadja
  • 5,813
  • 3
  • 26
  • 37
0

Please try to use IP address instead of mydomain.dev. When running on a real device, it will search dns server to look up mydomain.dev. If the dns server can't recognize this url, your device can't open it.

Joey Yi Zhao
  • 30,508
  • 51
  • 183
  • 377