달력

112024  이전 다음

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
1. openssl key 생성
 
[root@test~]# openssl genrsa -out server.key 2048

 

Generating RSA private key, 2048 bit long modulus
............................................+++
............+++
e is 65537 (0x10001)
 
[root@test ~]# openssl req -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) [XX]:KR
State or Province Name (full name) []:Seoul
Locality Name (eg, city) [Default City]:Seoul
Organization Name (eg, company) [Default Company Ltd]:asite
Organizational Unit Name (eg, section) []:
Common Name (eg, your name or your server's hostname) []:websvr
Email Address []:
 
Please enter the following 'extra' attributes
to be sent with your certificate request

 

A challenge password []:
An optional company name []:
 
[root@test ~]# openssl x509 -req -days 3650 -in server.csr -signkey server.key -out server.crt
Signature ok
subject=/C=KR/ST=Seoul/L=Seoul/O=asite/CN=websvr

 

Getting Private key
 
 
2. Tomcat openssl 설정 server.xml
 
<Connector
           port="8443" maxThreads="200"
           scheme="https" secure="true" SSLEnabled="true"
           SSLCertificateFile="/usr/local/ssl/server.crt"
           SSLCertificateKeyFile="/usr/local/ssl/server.key"
           clientAuth="optional" SSLProtocol="TLSv1"/>
 
  

'Web & Was' 카테고리의 다른 글

[WEB/WAS] Apache 컴파일 옵션  (0) 2020.09.17
[Apache] Apache modules  (0) 2020.08.20
[Web/Was] 파일서버 alias 설정(apache)  (0) 2020.07.31
[Web/Was] 에러 관련  (0) 2020.07.30
Posted by 짜꾸미의골골몽
|