Self-Signed provides a working example of how to create a self-signed certificate for NGINX.
To get started with Self-Signed, simply pull the Docker image:
docker pull nickolashkraus/self-signed
sudo nginx -c $(pwd)/nginx/nginx.conf
Run the Docker image:
docker run \ -p 1313:1313 \ nickolashkraus/self-signed:latest