Have you ever needed a way to easily transfer some files to someone or just let them browse through an index of some of the files on your hard drive? It not worth setting up a full fledged enormous web server like Apache or Nginx or Lighttpd. Instead I used to use thttpd to do this. I recently found out how to setup a web server that serves out an index of files from the directory it's run from with a Python one-liner.
# python 2 python -m SimpleHTTPServer 8080 # python 3 python3 -m http.server # ruby ruby -run -e httpd -- -p 8001 .
The Python lines will run a simple web server on port 8080 and serve out an index page of files relative to the current directory you ran the command from. It will check for index.html or index.htm and if found will serve it out. If it's not found it just defaults to serving a directory index. You can read more about the module here
If you wanted serve out files but use https (SSL/TLS) instead then you could do it with OpenSSL. The difference with the OpenSSL web server compared to the Python web server is that OpenSSL will not give you a directory index from the directory you start the server from. You will have to request each file directly. You also need to execute 2 lines to start the OpenSSL webserver. One to generate the web server cert and one to start the server. Still it's very easy.
# Generate the fake cert in the current dir. Press enter to answer all questions. openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout mycert.pem -out mycert.pem # Start the server on port 4433 (default) using the cert we just made openssl s_server -cert mycert.pem -accept 4433 -WWW
This will serve out files relative to the current directory. Since this is supposed to be quick and dirty the security about it is not that great but the connection is totally encrypted so nothing will be sent in plain text over the connection. With the lines above the key generated is in the same directory that we are serving data from so you should move that to a path outside of the web server. There are a bunch of other options for OpenSSL's s_server. Check out the man page with "man s_server".
I use a firewall to whitelist IP's from trusted people since you can't easily password protect these simple http(s) servers. Just a suggestion.