15 line python https + cgi server

Posted by & filed under Programming & Sysadmin, Web development.

For python 2.7 This expects a directory structure: /ssl_server.py /localhost.pem /html/index.html           html lives here, aka “root directory” /html/cgi/     python scripts live here Self Signed SSL cert made with openssl like this: openssl req -x509 -sha256 -newkey rsa:2048 -keyout localhost.pem \ -out localhost.pem -days 3650 -nodes ssl_server.py: #!/usr/bin/env python import os, sys import BaseHTTPServer import… Read more »