Skip to content

Instantly share code, notes, and snippets.

@radupotop
Created March 11, 2013 10:42
Show Gist options
  • Save radupotop/5133382 to your computer and use it in GitHub Desktop.
Save radupotop/5133382 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Generate key and certificate for Apache.
openssl genrsa -des3 -out server.key 2048
openssl req -new -key server.key -out server.csr
cp server.key server.key.org
openssl rsa -in server.key.org -out server.key
openssl x509 -req -days 3660 -in server.csr -signkey server.key -out server.crt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment