I'm running the bottle.py tutorial on one PC, and I was able to access it using
http://localhost:8080/hello/world
However, when I tried to access it (IP address is 192.168.1.10) from another PC on the LAN, using
http://192.168.1.10:8080/hello/world
I received the "Cannot Open Page" error.
I have the Apache web server running on the PC, and I can access the web server without any problem using
http://192.168.1.10
Any suggestions? Thanks.
Assuming you're talking about the Quickstart: “Hello World” example:
Change this line:
run(host='localhost', port=8080, debug=True)
To bind to the public IPv4 address of your computer:
run(host='192.168.1.10', port=8080, debug=True)
Or to this to listen on all interfaces including the external one [Source: bottle.run
, Bottle API Reference]:
run(host='0.0.0.0', port=8080, debug=True)
Then you should be able to access http://192.168.1.10:8080/hello/world
from your local PC as well as another PC on the LAN. Alternatively use a Fully Qualified Domain Name (FQDN).
If connections are still refused, check your firewall settings.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With