Creating an SSL certificate

Create a new directory inside the educa project directory and name it ssl. Then generate an SSL certificate from the command line with the following command:

sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout ssl/educa.key -out ssl/educa.crt

We are generating a private key and a 2048-bit SSL certificate valid for one year. You will be asked to enter data as follows:

Country Name (2 letter code) [AU]:State or Province Name (full name) [Some-State]:Locality Name (eg, city) []:Organization Name (eg, company) [Internet Widgits Pty Ltd]:Organizational Unit Name (eg, section) []:Common Name (e.g. server FQDN or YOUR name) []: educaproject.comEmail Address []: email@domain.com

You can fill in the requested ...

Get Django 2 by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.