Skip to content

Instantly share code, notes, and snippets.

@ilagnev
Last active May 22, 2017 14:35
Show Gist options
  • Save ilagnev/33e0ca7e8b9e17d0c95a04f5b68f3caa to your computer and use it in GitHub Desktop.
Save ilagnev/33e0ca7e8b9e17d0c95a04f5b68f3caa to your computer and use it in GitHub Desktop.
#!/bin/sh
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/nginx/ssl/nginx.key -out /etc/nginx/ssl/nginx.crt -config /etc/nginx/ssl/openssl.conf
[req]
distinguished_name = req_distinguished_name
x509_extensions = v3_ca
[req_distinguished_name]
C = GB
ST = Test State or Province
L = Test Locality
O = Organization Name
OU = Organizational Unit Name
CN = localhost
emailAddress = [email protected]
[v3_ca]
subjectAltName = @alt_names
[alt_names]
DNS.1 = localhost
DNS.2 = *.localhost
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment