
Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2018
02:28 PM
- 2,515 Views
Need a quick web server to serve content from the current directory?
You may have a an occassional need to setup a transient webserver (without installing any additional packages).
This is really easy with Python.
Simply change to the directory from which you want to serve content, and run the following:
python -m SimpleHTTPServer 80
Be mindful that only privileged users can bind to privileged ports.
2 Replies
KevinMGranger

Cadet
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2018
07:02 PM
- 2,501 Views
There's also
python3 -m http.server [port]
In case you prefer python 3 or want to avoid the shift key.

Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2018
07:06 PM
- 2,499 Views
Thanks @KevinMGranger!
Just to remind our users that the above will work with python3 installed, RHEL7 still ships with python2.
Join the discussion
You must log in to join this conversation.