Skip to content

Instantly share code, notes, and snippets.

@christianalfoni
christianalfoni / self-signed-wildcard-ssl-for-nginx.sh
Last active August 24, 2020 09:54 — forked from mikepsinn/self-signed-wildcard-ssl-for-nginx.sh
Create self-signed SSL certificate for Nginx
#!/usr/bin/env bash
# sudo apt-get install -y curl
# curl https://gist.githubusercontent.com/mikepsinn/b1142aa685ef71d6d3af9b01fc386539/raw/self-signed-wildcard-ssl-for-nginx.sh | sudo bash -s
ROOT_DOMAIN=codesandbox.test
# Specify where we will install
SSL_DIR="ssl"
# Set the wildcarded domain we want to use
WILDCARD_DOMAIN="*.${ROOT_DOMAIN}"