8

How to change port from 8000 on simplehttpserver in linux?

xXhRQ8sD2L7Z
  • 695
  • 5
  • 12
user468506
  • 89
  • 1
  • 1
  • 2

2 Answers2

18

The following was found in the first result for a google search for "simplehttpserver".

$ python -m SimpleHTTPServer <port_number>
EEAA
  • 109,363
  • 18
  • 175
  • 245
0

I also needed to know about this but realized that I was using the simplehttpserver package installed from npm (though internally it still uses the python version). I found out a bit more about the package here: https://github.com/tikonen/blog/tree/master/simplehttpserver. Although not mentioned in the docs, a quick read-through of the code points to the answer.

Here is what I found: simplehttpserver <-b bindhost> <-p port> <-m mimetype> <webroot>