4. 아파치 웹 서버에 SSL 모듈을 활성화하고 웹 서버 설정 파일에 인증서를 설정한다.
# 아파치 웹 서버 SSL 모듈 활성화
root@secu-VirtualBox:/etc/apache2/ssl# a2enmod ssl
Considering dependency setenvif for ssl:
Module setenvif already enabled
Considering dependency mime for ssl:
Module mime already enabled
Considering dependency socache_shmcb for ssl:
Enabling module socache_shmcb.
Enabling module ssl.
See /usr/share/doc/apache2/README.Debian.gz on how to configure SSL and create self-signed certificates.
To activate the new configuration, you need to run:
systemctl restart apache2
# 웹 서버 설정 파일에 인증서 설정
root@secu-VirtualBox:/etc/apache2/ssl# vi /etc/apache2/sites-available/default-ssl.conf
/etc/apache2/site-available/default-ssl.conf
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/server.crt
SSLCertificateKeyFile /etc/apache2/ssl/server.key