![]() |
![]() |
#1 (permalink) |
版主
注册日期: 2012-02-07
帖子: 281
|
![]()
修改/usr/local/jdmail/Apache2.2/conf/httpd.conf
# Secure (SSL/TLS) connections Include conf/extra/httpd-ssl.conf 下面这行放开 编辑conf/extra/httpd-ssl.conf DocumentRoot改成实际安装目录 DocumentRoot "/root/leiyb/jdmail-v3.14.3/jdmail/Apache2.2/htdocs" 制作证书 #/usr/local/jdmail/Apache2.2/conf/ssl.ca-0.1 #./new-root-ca.sh (生成根证书) No Root CA key round. Generating one Generating RSA private key, 1024 bit long modulus ...........................++++++ ....++++++ e is 65537 (0x10001) Enter pass phrase for ca.key: (输入一个密码) Verifying - Enter pass phrase for ca.key: (再输入一次密码) ...... Self-sign the root CA... (签署根证书) Enter pass phrase for ca.key: (输入刚刚设置的密码) ........ ........ (下面开始签署) Country Name (2 letter code) [MY]:CN State or Province Name (full name) [Perak]:GuangDong//随你喜欢 Locality Name (eg, city) [Sitiawan]:GuangZhou//随你喜欢 Organization Name (eg, company) [My Directory Sdn Bhd]:GDLC//随你喜欢 Organizational Unit Name (eg, section) [Certification Services Division]:GDLC//随你喜欢 Common Name (eg, MD Root CA) []:winson CA//随你喜欢 Email Address []:yu.hanhui@gd-linux.org//随你喜欢 这样就生成了ca.key和ca.crt两个文件,下面还要为我们的服务器生成一个证书: # ./new-server-cert.sh server (这个证书的名字是server) ...... ...... Country Name (2 letter code) [MY]:CN State or Province Name (full name) [Perak]: GuangDong Locality Name (eg, city) [Sitiawan]: GuangZhou Organization Name (eg, company) [My Directory Sdn Bhd]:GDLC Organizational Unit Name (eg, section) [Secure Web Server]:GDLC Common Name (eg, www.domain.com) []:localhost Email Address []:yu.hanhui@gd-linux.org 这样就生成了server.csr和server.key这两个文件。 还需要签署一下才能使用的: # ./sign-server-cert.sh server CA signing: server.csr -> server.crt: Using configuration from ca.config Enter pass phrase for ./ca.key: (输入上面设置的根证书密码) Check that the request matches the signature Signature ok The Subject's Distinguished Name is as follows countryName :PRINTABLE:'CN' stateOrProvinceName :PRINTABLE:'JiangSu' localityName :PRINTABLE:'NanJing' organizationName :PRINTABLE:'Wiscom System Co.,Ltd' organizationalUnitName:PRINTABLE:'ACSTAR' commonName :PRINTABLE:'acmail.wiscom.com.cn' emailAddress :IA5STRING:'acmail@wiscom.com.cn' Certificate is to be certified until Jul 16 12:55:34 2005 GMT (365 days) Sign the certificate? [y/n]:y 1 out of 1 certificate requests certified, commit? [y/n]y Write out database with 1 new entries Data Base Updated CA verifying: server.crt <-> CA cert server.crt: OK 最后给权限 chmod 400 server.key server.crt 和server.key放在conf下面 系统设置--SSL--私用运行环境的安装 制作证书 /root/leiyb/jdmail-v3.14.3/jdmail/sslconf 把server.cert 和server.key复制到/usr/local/jdmail/Apache2.2/conf 修改extra/httpd-ssl.conf SSLCertificateFile "/usr/local/jdmail/Apache2.2/conf/server.cert" |
![]() |
![]() |