Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Viewing localhost website from mobile device

I have an ASP.Net website hosted on my Win8's localhost, the site seems to be running as expected on the desktop, but now i also want to test the site website on mobile device to check how it renders

Is there anyway i can access the website from my mobile device

My Mobile Device and Desktop Machine are connected to the same Network via Router.

Here are the details of my machine and router.

  1. Machine has Win8 Pro Installed running IIS 8.0.9200.16384
  2. Router is TP-Link Basic 150Mbps.
  3. Device is Karbonn A15, Android - 4.0.4 (ICS)

Can anyone tell me how can i connect my mobile device to localhost website.

like image 502
Abbas Avatar asked Jun 26 '13 09:06

Abbas


People also ask

How do I access my localhost website?

To access the server from itself, use http://localhost/ or http://127.0.0.1/ . To access the server from a separate computer on the same network, use http://192.168.X.X where X.X is your server's local IP address. You can find the sever's local IP address (assuming it's Linux) by running hostname -I . 127.0.

How do I view a localhost website on my iPhone?

If you're using MAMP, key in your IP address (let's say 192.0. 0.63) in your iPhone Safari browser, followed by the port number 8888 (e.g. 192.0. 0.63:8888) and you will be able to see your local site in your iPhone.

Can localhost be accessed remotely?

The naming in this question is a bit ambiguous: localhost is the de-facto standard (DNS) name for the local loop back address 127.0. 0.1 , which can not be accessed from outside of the (local) host itself.


1 Answers

To view localhost website from mobile device you have to follow thoses steps :

  • In your computer, you have to retrieve your IP address (Run > cmd > ipconfig)
  • If your localhost use a specific port (like localhost:12345 ), you have to open the port on your computer (Control Panel > System and Security > Firewall > Advanced settings and add Inbound rule)
  • Finally, you can access to your website from mobile device by navigate to : http://192.168.X.X:12345/

Hope it helps

like image 74
Joffrey Kern Avatar answered Oct 13 '22 23:10

Joffrey Kern