Skip to content

0xdead8ead/basic-auth-simple-https-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Basic Auth Simple HTTPS Server

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.

Get Lets Encrypt HTTPS Cert for Server:

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

Authorization Key Generation:

Basic Auth Username and Password is generated with the following command

echo -n "<username>:<password>" | base64

Running the Simple HTTPS Server:

python simple-https-server_basic-auth.py

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

Python 3 SimpleHTTPServer over HTTPS TLS with Basic Auth

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages