Olaf
Olaf

Reputation: 37

I want to access the localhost on PC from my mobile phone but it doesn't work

I want to access my localhost on PC from a mobile phone. I have Windows XP and HUAWEI SNE-LX1. I run XAMPP and I connected my mobile phone by USB cable. I did it some time ago and it worked. I do the same now and it doesn't work . I am working on a website on my PC and I want to take a look to see how the website looks like on mobile phone. After connecting my mobile phone I run CMD and put ipconfig and I take the IPv4 and then put it in the browser on mobile phone.

IPv4 address

in the browser on mobile phone the error goes: ERR_CONNECTION_TIMED_OUT

Firewell settings

Screen from my mobile phone

Upvotes: 1

Views: 1410

Answers (1)

Onkar Chougule
Onkar Chougule

Reputation: 181

This can be happening because of two things,

  1. you should add port number to the address like: 192.168.2.100:5000

    where 5000 is the port number on which your app is running

  2. turn off firewall of the pc/laptop

then you should be able to view the website on mobile In my case it was the 2nd problem

Upvotes: 2

Related Questions