Skip to content

Instantly share code, notes, and snippets.

@ric03uec
Created December 25, 2014 18:28
Show Gist options
  • Save ric03uec/79d158f981e1af060c67 to your computer and use it in GitHub Desktop.
Save ric03uec/79d158f981e1af060c67 to your computer and use it in GitHub Desktop.
$ mkdir -p /etc/haproxy/ssl
$ sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/haproxy/ssl/haproxy.key -out /etc/haproxy/ssl/haproxy.crt
Generating a 2048 bit RSA private key
.................+++
.....................+++
writing new private key to '/etc/haproxy/ssl/haproxy.key'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:
State or Province Name (full name) [Some-State]:
Locality Name (eg, city) []:
Organization Name (eg, company) [Internet Widgits Pty Ltd]:
Organizational Unit Name (eg, section) []:
Common Name (e.g. server FQDN or YOUR name) []:
Email Address []:
$ ls /etc/haproxy/ssl
haproxy.crt haproxy.key
$ sudo cat /etc/haproxy/ssl/haproxy.crt /etc/haproxy/ssl/haproxy.key | sudo tee /etc/haproxy/ssl/haproxy.pem
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment