SSL을 먼저 구입한다. 구입할수 있는 다른 여러 사이트가 있는데, https://www.ssls.com 에서 싸게 구입할 수 있다. 결제를 완료하면 CSR파일을 업로드 해라고 나오는데 로컬 컴퓨터에서 생성해서 올려야 한다.
private key를 만든다. pass phrase
는 바로 복호화한 server.key
파일을 만들것 이기 때문에 아무 패스워드나 넣는다.
$ openssl genrsa -des3 -out server.pass.key 2048
Generating RSA private key, 2048 bit long modulus
.........+++
................................+++
e is 65537 (0x10001)
Enter pass phrase for server.pass.key:
이전에 입력했던 pass phrase
를 넣어서 복호화한 server.key
를 만든다.
$ openssl rsa -in server.pass.key -out server.key
Enter pass phrase for server.pass.key:
writing RSA key
SSL구매 사이트에 올릴 CSR을 만든다. Common Name
에는 사용할 domain을 적는다.
www.dabangapp.com
으로 적으면 dabangapp.com
까지 자동으로 포함되므로
www.dabangapp.com
을 적는다.
$ openssl req -nodes -new -key server.key -out server.csr
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]:KR
State or Province Name (full name) [Some-State]:Seoul
Locality Name (eg, city) []:Seoul
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Station3, Inc.
Organizational Unit Name (eg, section) []:
Common Name (e.g. server FQDN or YOUR name) []:www.dabangapp.com
Email Address []:[email protected]
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:
이렇게 하면 server.key
와 server.csr
파일이 만들어 졌다. server.key
는 private key이기 때문에 외부에
유출 되지 않게 조심해야 한다.
server.csr
파일을 업로드 하면 domain 소유자인지 체크과정을 거치고 인증서 www_dabangapp_com.crt
를 이메일로 보내준다.
server.key
파일과 www_dabangapp_com.crt
을 가지고 각자 웹서버 환경에 맞게 설치하면 된다.
AWS ElasticBeanstalk에 SSL등록 방법
파라메터 중에 인증서 이름 부분을 바꿔주면 된다. 이렇게 한뒤 Load balancer 설정 부분에서 선택 가능하다.