Recipe: How to create a self-signed SSL certificate Ubuntu + Nginx

RECIPE: Create a self-signed SSL certificate for Ubuntu and Nginx website.

  1. Create a directory to place the ssl certificates.
  2. Generate the ssl certificate replacing [CERTIFICATE_NAME] with a valid file name.

    Example:-
  3. Reference the certificate inside the server block in the nginx site config file.
  4. Go to your site in a browser e.g. https://example.com/ and you should get a browser warning message saying the site is unsafe because the certificate authority i.e. you, is not trusted by your computer. Trust the certificate to view your site over SSL.

    Untrusted connection warning message
    An example of the kind of warning messages browsers give when using self-signed certificates

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.