Configuring NGINX with TLS

While we've covered Apache's HTTPD server so far in this chapter, there are other options available for use on Linux platforms as well. One popular offering is nginx (pronounced engine-x), which works well as a lightweight, fast, multithreaded offering.

We're going to look at how to set it up as a TLS webserver.

How to do it…

Installing on Ubuntu 14.04:

  1. Install the software:
    sudo apt-get install nginx
    
  2. Configure the server for TLS by uncommenting the HTTPS server section of /etc/nginx/sites-available/default while populating the ssl_certificate, ssl_certificate_key and ssl_ciphers variables.
  3. Restart the daemon:
    sudo service nginx restart
    

Installing on CentOS 7:

  1. On CentOS 7, nginx is not included in the default repos, but is ...

Get Linux Networking Cookbook 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.