Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why can't I access a simple Python server on a different computer?

I'm running Python's http.server with this command: py -m http.server --bind 0.0.0.0

I can access the server on the same computer by typing bob:8000 in a browser's address bar (I may or may not have named my computer Bob), but when I try to access the server in the same way from a different computer on the same network, it says

This site can’t be reached

bob’s server IP address could not be found.

I was able to access this server previously, but I haven't been able to since upgrading my internet and router. How can I access this server from another computer?

like image 953
Daniel Giger Avatar asked Oct 23 '25 10:10

Daniel Giger


1 Answers

hey there you should be using your IPv4 address if you are accessing it from another computer.You can only access the 0.0.0.0:8000 from your computer similarly you can only use the following address from your computer

  1. 127.0.0.0:anyport
  2. localhost:anyport
  3. 0.0.0.0:anyport

You can always find out your IPv4 address by typing ipconfig in cmd the the IPv4 address would be looking like this

192.168.xxx.xxx,10.0.xxx.xxx

After you try this you should be able to access the page from another computer

Good luck!

like image 139
Sashank Avatar answered Oct 25 '25 00:10

Sashank



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!