apache 支持ssl 证书

1yum install mod_ssl -y
cd /etc/pki/tls/certs
2.make httpd.crt
3、编辑配置文件:/etc/http/conf .d/ssl.conf
  修改证书和密钥文件的路径为我们创建的证书和密钥的所在位置
vim /etc/httpd/conf.d/ssl.conf
SSLCertificateFile /etc/pki/tls/certs/httpd.crt
SSLCertificateKeyFile /etc/pki/tls/certs/httpd.key
4、重新启动httpd服务
https://IP/index.html


证书:
     cd /etc/pki/CA
mkdir crl certs newcerts
touch index.txt
echo "01">serial
openssl genrsa -out private/cakey.pem 1024 #生成CA认证中心 RSA 私钥
openssl req -new -x509 -key private/cakey.pem -out cacert.pem#生成根证书
NOTICE:
这时填入的信息:countryName = CN
stateOrProvinceName = HENAN
organizationName = HLLO(下面申请证书时要保持一致)
openssl genrsa -out private/server.key 1024#生成ssl证书私钥
openssl req -new -key private/server.key -out crl/server.csr#申请证书
openssl ca -in /etc/pki/crl/server.csr -out /etc/pki/certs/server.crt



你可能感兴趣的:(apache,ssl,cert)