1 | openssl genrsa 1024 >tian_server.key |
1 | openssl req -new -config openssl.cnf -key tian_server.key >tian_server.csr |
1 2 3 4 5 6 7 8 9 | Country Name (2 letter code) [AU]:CN ISO 国家代码(只支持两位字符) State or Province Name (full name) [Some-State]:ZJ 所在省份 Locality Name (eg, city) []:HZ 所在城市 Organization Name (eg, company): 公司名称 Organizational Unit Name (eg, section) []: 组织名称 Common Name (eg, YOUR name) []: 申请证书的域名(建议和httpd.conf中serverName必须一致) Email Address []:admin@admin.com 管理员邮箱 Please enter the following 'extra' attributes to be sent with your certificate request A challenge password []: 交换密钥 An optional company name []: |
1 2 | openssl req -x509 -days 5000 -config openssl.cnf -key tian_server.key -in tian_server.csr >tian_server.crt |
1 2 | LoadModule ssl_module modules/mod_ssl.so Include conf/extra/httpd-ssl.conf |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | 在conf\extra目录下,编辑 httpd_ssl.conf Listen 443 SSLPassPhraseDialog builtin SSLSessionCache "dbm ![]() #SSLSessionCache "shmcb ![]() (以上2种请自行监测,如有一种导致服务器启动不了,就换成另一种) SSLSessionCacheTimeout 300 <VirtualHost _default_:443> # General setup for the virtual host DocumentRoot "D:/PHPStudy/WWW/phpSSL" ServerName phpssl.com:443 ErrorLog "D:/PHPStudy/Apache/logs/no-robots_error.log.txt" TransferLog "D:/PHPStudy/Apache/logs/no-robots_access.log.txt" SSLCertificateFile "D:/PHPStudy/Apache/conf/tian_server.crt" SSLCertificateKeyFile "D:/PHPStudy/Apache/conf/tian_server.key" CustomLog "D:/PHPStudy/Apache/logs/ssl_request.log" \ "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" |
欢迎光临 商会资讯 (http://smellage.com/) | Powered by Discuz! X2.5 |