1) SSL설치
https://rootrator.tistory.com/136
[서버환경]
CentOS 7.2
Apache 2.4
Yum으로 설치되었으며 mod_ssl 설치가 안되어 설치를 진행.
]# yum -y install mod_ssl
conf.d 아래이 ssl.conf 가 생성된다. 해당 설정파일에서 가상호스트를 작성한다.
<VirtualHost _default_:443> 해당 부분을 알맞게 수정.
<VirtualHost *:443>
ServerName abc.com
ServerAlias www.abc.com
DocumtnRoot /home/abc/www
SSLEngine on
SSLCertificateFile /etc/httpd/cert/abc.com.crt
SSLCertificateKeyFile /etc/httpd/cert/abc.com.key
</VirtualHost>
]# service httpd restart
Redirecting to /bin/systemctl restart httpd.service
서비스 재시작하는 부분에서 에러가 뜰수 있는데 해당 내용을 살펴보면
]# systemctl status httpd.service
------------------------httpd[3100]: In order to read them you have to provide the pass phrases.
Pass Phrase 요구한다.
Pass를 Key파일안에 삽입하기로 한다.
]# openssl rsa -in /etc/httpd/cert/abc.com.key -out /etc/httpd/cert/abc.com.key
Enter pass phrase for abc.com.key:
writing RSA key
이후 서비스 재시작
]# service httpd restart
Redirecting to /bin/systemctl restart httpd.service
포트 확인
]# netstat -lnp | grep 443
tcp6 0 0 :::443 :::* LISTEN 3794/httpd
(*) httpd.conf에 80번포트도 virtualhost설정해줘야 함.
<VirtualHost *:80>
ServerName aaa.bbb.com
# ServerAlias genereport.psomagen.com
DocumentRoot /var/www/html
</VirtualHost>
출처: https://rootrator.tistory.com/136 [R O O T + A D M I N I S T R A T O R]
2)Certbot으로 인증서 설치.
2. https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-centos-7
출처 : http://blog.daum.net/techtip/12415372