The commands are simple.
For Python 2.x: python -m SimpleHTTPServer
[user@fedora folder1]$ python -m SimpleHTTPServerFor Python 3.x: python3 -m http.server
Serving HTTP on 0.0.0.0 port 8000 ...
[user@fedora folder1]$ python3 -m http.server
Serving HTTP on 0.0.0.0 port 8000 ...
http://<your-ip-address>:8000Make sure your firewall/IP-tables are properly adjusted to allow the inbound connection.
The terminal will show a running Apache style access log of connections. CTRL + c to exit.
Performance is pretty good too:
Official documentation here:
https://docs.python.org/2/library/simplehttpserver.html
https://docs.python.org/3/library/http.server.html
No comments:
Post a Comment