Skip to content

Instantly share code, notes, and snippets.

@markis
Last active August 21, 2017 23:47
Show Gist options
  • Save markis/da192c1e0af5150369f34ba2392212bb to your computer and use it in GitHub Desktop.
Save markis/da192c1e0af5150369f34ba2392212bb to your computer and use it in GitHub Desktop.
openssl genrsa -out server.key 2048
openssl req -key server.key -sha256 -x509 -nodes -new -days 3650 -out server.crt -subj "/CN=Local Development" \
-reqexts SAN -extensions SAN \
-config <(cat /usr/local/etc/openssl@1.1/openssl.cnf \
<(printf '[SAN]\nsubjectAltName=DNS:dev.local'))
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain server.crt
sudo nginx -s stop && sudo nginx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment