Open clms2 opened 5 years ago
httpd.conf
mod_ssl.so
httpd-mpm.conf
httpd-ssl.conf、
httpd-ssl.conf
set OPENSSL_CONF=../conf/openssl.cnf
openssl genrsa -out server.key 2048
openssl req -new -key server.key -out server.csr -sha256 -config ../conf/openssl.cnf
openssl genrsa -out client.key 2048
openssl req -new -key client.key -out client.csr -sha256 -config ../conf/openssl.cnf
openssl req -new -x509 -keyout ca.key -out ca.crt -sha256 -config ../conf/openssl.cnf
demoCA/newcerts
demoCA/index.txt
demoCA/serial
openssl ca -in server.csr -out server.crt -cert ca.crt -keyfile ca.key -config ../conf/openssl.cnf
openssl ca -in client.csr -out client.crt -cert ca.crt -keyfile ca.key -config ../conf/openssl.cnf
openssl pkcs12 -export -in ca.crt -inkey ca.key -out ca.pfx
openssl rsa -in server.key -out server.key
../conf
httpd: Could not reliably determine the server's fully qualified domain name
ServerName localhost:80
todo -sha256不会生成sha256证书
httpd.conf
: 打开mod_ssl.so
、httpd-mpm.conf
、httpd-ssl.conf、
mod_socache_shmcb.so`的注释httpd-ssl.conf
: 打开SSLCertificateFile、SSLCertificateKeyFile、SSLCACertificateFile、SSLVerifyClient、SSLVerifyDepthset OPENSSL_CONF=../conf/openssl.cnf
b.openssl genrsa -out server.key 2048
c.openssl req -new -key server.key -out server.csr -sha256 -config ../conf/openssl.cnf
d.openssl genrsa -out client.key 2048
e.openssl req -new -key client.key -out client.csr -sha256 -config ../conf/openssl.cnf
f.openssl req -new -x509 -keyout ca.key -out ca.crt -sha256 -config ../conf/openssl.cnf
demoCA/newcerts
、demoCA/index.txt
、demoCA/serial
并输入01保存openssl ca -in server.csr -out server.crt -cert ca.crt -keyfile ca.key -config ../conf/openssl.cnf
openssl ca -in client.csr -out client.crt -cert ca.crt -keyfile ca.key -config ../conf/openssl.cnf
openssl pkcs12 -export -in ca.crt -inkey ca.key -out ca.pfx
,找到ie浏览器的证书选项,导入该文件openssl rsa -in server.key -out server.key
,把该文件和server.crt复制到../conf
目录报错
httpd: Could not reliably determine the server's fully qualified domain name
: 修改httpd.conf,打开ServerName的注释,ServerName localhost:80