Generate a Certificate for NGINX

Follow these instructions to generate a certificate for NGINX for non-production set ups.
You should not use self-signed certificates for production systems. It is recommended to use a properly signed certificate for production systems. These instructions are intended only for non-production setups
  1. To use OpenSSL to generate a self-signed certificate run the following command:
    sudo openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout /etc/nginx/cert.key -out /etc/nginx/cert.crt
  2. When prompted, complete the on-screen instructions to complete the required fields.

Recommended For You