OpenSSL: Generate self-signed certificates

OpenSSL can generate self-signed SSL certificates easily. For internal services I usually generate a cert that is valid for ten years. Use the following commands to create a certificate and key file.

export DOMAIN=www.domain.com
openssl req -x509 -nodes -sha256 -days 3650 -newkey rsa:2048 -keyout $DOMAIN.key -out $DOMAIN.crt


Note: Replies will be formatted with PHP Markdown Extra syntax.

Name: Email (Not Required):
 
Logged IP: 3.137.176.213
To prevent spam please submit by clicking the kitten: