December 2018
Beginner to intermediate
404 pages
10h 14m
English
Next, we should install a certificate that will enable us to use SSL.
To create a self-signed certificate, use the following commands:
$ sudo mkdir /etc/ssl/nginx && cd /etc/ssl/nginx $ sudo openssl req -x509 -newkey rsa:2048 \-keyout server.key -out server.crt -days 365 -nodes $ sudo chmod a-wx * # make files read only $ sudo chown www-data:root * # access only to www-data group
The preceding code creates an /etc/ssl/nginx directory and creates a passwordless self-signed SSL certificate. When running the openssl command, the user will be asked for some additional information, and then a certificate and key files will be generated. Finally, the ownership of these files is given to the www-data user, ...
Read now
Unlock full access