2

I have a local server running via Flask. I go to localhost:5000 and I get served with my test page.

My computer's IP address on my wifi network is 192.168.1.128. My phone is connected to the same wifi network as my laptop.

When I access 192.168.1.128:5000 on either my laptop or phone, I get served with "This site cannot be reached: 192.168.1.128 refused to connect."

Why is this happening? My firewall is disabled and my httpd.conf seems to allow anything. Here's that file incase I'm missing something: https://gist.github.com/MatthewPageCS/3eee9ac18dc8311302b37946f5eb338a

All I need to do is connect my phone to a server running my flask code. Any idea what could be causing my computer to allow me to connect to localhost but not the wifi IP address?

CaptainForge
  • 1,365
  • 7
  • 21
  • 46

1 Answers1

4

You have to run your flask application on 0.0.0.0 otherwise it will not be an externally visible server.

Take a loot at the Flask Quickstart Documentation.

mie.ppa
  • 125
  • 3
  • 10
Harrison
  • 5,095
  • 7
  • 40
  • 60