Search code examples
pythonweb-serviceshttpwebserverpython-server-pages

How to make python web server to respond on IP adress?


I am testing some python functionalities as web server. Typed :

$ python -m SimpleHTTPServer 8080

...and setup port forwarding on router to this 8080. I can access via web with http://my.ip.adr.ess:8080/, whereas my.ip.adr.ess stands for my IP adress.

When I started my xampp server it is accessible with http://my.ip.adr.ess/ and no 8080 port is required for accessing.

What should I have to do to python server responds like that?


Solution

  • It means that xampp is running on port 80 which is default for http://. You need to run SimpleHTTPServer on that port too. More info about running SimpleHTTPServer on port 80.