Python 3 SimpleHTTPServer over HTTPS using Basic Auth
Uses Python 3 standard library. Creates ./files directory from which files can be served. Logging outputs to simple.log. Cert & Key file must be created prior to running.
A Lets Encrypt TLS certificate can be generated with the following commands
sudo certbot certonly --register-unsafely-without-email --standalone -d <domain_name>
sudo cat /etc/letsencrypt/live/<domain_name>/fullchain.pem > server.pem
sudo cat /etc/letsencrypt/live/<domain_name>/privkey.pem >> server.pem
Alternatively a self signed certificate can be generated with the following command
openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
Basic Auth Username and Password is generated with the following command
echo -n "<username>:<password>" | base64
python simple-https-server_basic-auth.py
- Chase Schultz - Initial work - @f47h3r_b0
This project is licensed under the MIT License - see the LICENSE.md file for details