[sudo] apt-get install stunnelcd path/to/django/project
mkdir stunnel
cd stunnelCreate the key:
openssl genrsa 1024 > stunnel.key
openssl req -new -x509 -nodes -sha1 -days 365 -key stunnel.key > stunnel.cert
cat stunnel.key stunnel.cert > stunnel.pemCreate the dev_https file with:
pid=
cert = stunnel/stunnel.pem
foreground = yes
output = stunnel.log
[https]
accept=0.0.0.0:8443
connect=0.0.0.0:8000
TIMEOUTclose=1In one terminal run:
stunnel stunnel/dev_httpsIn another, run:
./runserverSets the permission:
chmod a+x runserverThe SSL works in:
https://localhost:8443