HTTPS

Nginx comes with the ability to encrypt communications using openssl. What this means is that your website can be accessed using https:// instead of just http:// and all communications to and from the site will be encrypted.

For HTTPS to work, a certificate and a key are required. You should either generate a self-signed certificate and key (adequate for internal use or for personal sites) or buy a certificate from a certified CA authority (necessary if you want anyone to trust your site for commercial ventures).

To generate a key for the certificate, use this command:

matthew@seymour:~$ openssl genrsa -des3 -out server.key 2048

This will generate a basic key using Triple-DES and 2048-bit encryption. See the ...

Get Ubuntu Unleashed 2015 Edition: Covering 14.10 and 15.04, Tenth Edition 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.