HTTP server not working (Python)
This is my first time trying to get HTTP servers working on my computer, so I ran into several technical difficulties.
I am using Python to develop a server and I can access it on my localhost. But when I try to connect via IP it doesn't work. I tried to connect to the phone too and it didn't work. In my opinion, I can connect to the server, but others cannot. I have disabled Windows Firewall and it still doesn't work. Here is my code:
import SimpleHTTPServer
import SocketServer
handl = SimpleHTTPServer.SimpleHTTPRequestHandler
s = SocketServer.TCPServer(("localhost",2138),handl)
s.serve_forever()
If it matters, I had the same problem with WAMP Server. I turn off the firewall and start it and I can't connect to other devices. Moreover, I tried it in a different house on a different router and it still didn't work. However, I can connect to my own WAMP server.
I really don't understand what is going wrong and I would appreciate it if someone could help me!
source to share
It looks like your router is blocking you. You need to open the configuration page of your router, usually 192.168.1.1 or something similar, check your router manual. Then you need to configure it to port the port to your server PC. The step for this varies from router to router, try translating "your_router_here port forwarding" without quotes, replace your_router_here with the router you are using.
source to share