生成服务器根证书
openssl genrsa -des3 -passout pass:x -out server.pass.key 2048
openssl rsa -passin pass:x -in server.pass.key -out server.key
rm server.pass.key
openssl req -new -key server.key -out server.csr
用服务器根证书生成网站SSL证书
openssl x509 -req -days 3650 -in server.csr -signkey server.key -out server.crt
配置https
- http.conf开启Include conf/extra/httpd-ssl.conf
- 修改/usr/local/apache/conf/extra/httpd-ssl.conf
SSLCertificateFile "/usr/local/apache/ssl/server.crt"
SSLCertificateKeyFile "/usr/local/apache/ssl/server.key"
评论区