-
-
Save ryzy/46f250ba9586b8a46a88 to your computer and use it in GitHub Desktop.
SSL dummy cert for Nginx and HAProxy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generate all keys and cefiticates in /etc/ssl/ directory | |
openssl genrsa -out /etc/ssl/dummy.key 2048 | |
openssl req -new -key /etc/ssl/dummy.key -out /etc/ssl/dummy.csr -subj "/C=GB/L=London/O=Company Ltd/CN=haproxy" | |
openssl x509 -req -days 3650 -in /etc/ssl/dummy.csr -signkey /etc/ssl/dummy.key -out /etc/ssl/dummy.crt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Concatenate certificate and key into .pem format, compatible with HAProxy | |
cat /etc/ssl/dummy.crt /etc/ssl/dummy.key > /etc/ssl/dummy.pem |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment