Forked from yuezhu/gist:47b15b4b8e944221861ccf7d7f5868f5
Last active
February 11, 2019 00:50
Revisions
-
visualdensity renamed this gist
Feb 11, 2019 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
yuezhu created this gist
Feb 7, 2018 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ # Generate a unique private key (KEY) sudo openssl genrsa -out mydomain.key 2048 # Generating a Certificate Signing Request (CSR) sudo openssl req -new -key mydomain.key -out mydomain.csr # Creating a Self-Signed Certificate (CRT) openssl x509 -req -days 365 -in mydomain.csr -signkey mydomain.key -out mydomain.crt # Append KEY and CRT to mydomain.pem sudo bash -c 'cat mydomain.key mydomain.crt >> /etc/ssl/private/mydomain.pem' # Specify PEM in haproxy config sudo vim /etc/haproxy/haproxy.cfg listen haproxy bind 0.0.0.0:443 ssl crt /etc/ssl/private/mydomain.pem