Configure Nginx with SSL

If your currently using nginx for web server or proxy functionality you may find the need to configure ssl on your server.

The following steps all you to easily configure your nginx server for ssl.

First create your ssl key and certificate using instructions provided on this blog.

Once created locate your default nginx configuration file.

You’ll want to add a server context section for listening on 443 like the following.

server {
    listen       443 ssl;
    ssl_certificate     wildcard.simplespider.com.chain.crt;
    ssl_certificate_key wildcard.simplespider.com.key;
    ssl_protocols       SSLv3 TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers         HIGH:!aNULL:!MD5;
    server_name  example1.simplespider.com example2.simplespider.com
    }

Restart your nginx instance
  service nginx restart