
* 원본 링크: How to watch every Marvel property in the perfect order
$ sudo apt-get install openssl
$ sudo openssl genrsa –des3 -out keyname.key 2048
$ sudo openssl req –new –key keyname.key > csr.pem
// 또는
$ sudo openssl req –new –key keyname.key -out csr.pem
$ sudo a2enmod ssl
$ sudo openssl rsa -in keyname.key -out keyname_no_pass.key
$ sudo ufw allow https
<VirtualHost *:443>
ServerName domain.com
ServerAdmin name@email.com
ServerAlias www.domain.com *.domain.com
DocumentRoot /html/directory
<Directory /html/directory>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
SSLEngine on
SSLProtocol all -SSLv2 -SSLv3
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM
SSLHonorCipherOrder on
# 인증서 파일 (5번)
SSLCertificateFile "/ssl_directory/cert.pem"
# 개인키 파일 (2번)
SSLCertificateKeyFile "/ssl_directory/keyname.key"
# 체인 인증서 (확장자가 .ca-bundle 인 경우도 있음)
SSLCertificateChainFile "/ssl_directory/cert.cer"
ErrorDocument 402 /missing.html
ErrorDocument 403 "/cgi-bin/cgi-script.pl"
ErrorDocument 404 error.domain.com
ErrorDocument 500 "Internal Server Error"
ErrorLog ${APACHE_LOG_DIR}/domain-error.log
CustomLog ${APACHE_LOG_DIR}/domain-access.log combined
</VirtualHost>