删除原先的nginx,新增ssl模块
./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module
make
make install
#查看是否成功
/usr/local/nginx/sbin/nginx -V
Nginx配置https证书
server {
listen 443 ssl;
server_name 16web.net;
ssl_certificate /usr/local/software/biz/key/4383407_16web.net.pem;
ssl_certificate_key /usr/local/software/biz/key/4383407_16web.net.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
location / {
root html;
index index.html index.htm;
}
}
https访问实操
杀掉原先进程
防火墙关闭或者开放443端口
service firewalld stop
网络安全组开放端口