( 1 ) 在Apache的安装目录下创建cert目录,并且将下载的全部文件拷贝到cert目录中。
#mkdir /etc/apache2/cert
#mv /download/public.pem/etc/apache2/cert/public.pem
#mv /download/21#####63.key /etc/apache2/cert/21#####63.key
#mv /download/chain.pem /etc/apache2/cert/chain.pem
#a2enmod ssl
(2)修改ports.conf
#vi /etc/apache2/ports.conf
(3)修改default-ssl
#vi/etc/apache2/sites-available/default-ssl
# SSLCertificateFile directive is needed.
SSLCertificateFile /etc/apache2/cert/public.pem
SSLCertificateKeyFile /etc/apache2/cert/21#####63.key
# Server Certificate Chain:
# Point SSLCertificateChainFile at a file containing the
# concatenation of PEM encoded CA certificates which form the
# certificate chain for the server certificate. Alternatively
# the referenced file can be the same as SSLCertificateFile
# when the CA certificates are directly appended to the serve
r# certificate for convinience.
SSLCertificateChainFile /etc/apache2/cert/chain.pem
(4)启用ssl,重启apache
#a2ensitedefault-ssl
#service apache2 restart
网友评论