一、安装nginx
https://blog.csdn.net/u013288190/article/details/114536068
二、将ssl模块编译到nginx中
将后续需要的模块一次性安装
./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_flv_module --with-http_gzip_static_module&&make && make install
三、安装openssl
检测openssl是否安装
rpm -qa openssl 2 openssl-1.0.1e-42.el7.x86_64
若没有安装
yum -y install openssl openssl-devel
如果都安装成功,可以通过下面的命令查看
./nginx -V
四、安装https证书 1. 如果是测试使用
https://www.cnblogs.com/qiyueqi/p/11551238.html
关键步骤为:
- 生成根证书CA
- 根据CA证书创建server端证书
2. 正式使用 购买证书www.ihuandu.com 从客服手里得到证书文件