1.
yum install gcc-c++
2.yum install -y pcre pcre-devel
3.yum install -y zlib zlib-devel
4.yum install -y openssl openssl-devel
5.解压安装nginx1.16.0
6.configure --with-http_ssl_module
7.make & make install
8.配置nginx.conf
server {
listen 443 ssl;
server_name wx.feiit.top;
ssl on;
ssl_certificate /usr/local/nginx/ssl/wx.feiit.top.pem;
ssl_certificate_key /usr/local/nginx/ssl/wx.feiit.top.key;
root html;
index index.html index.htm;
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_prefer_server_ciphers on;
location / {
root html;
index index.html index.htm;
}
}
9.安全组规则已经允许443
10.服务器防火墙已关闭(firewalld)
11.访问http://wx.feiit.top可以正确访问
12.netstat 查看端口没有443(端口443未开启,问题所在)
13.无法访问https://wx.feiit.top(原因就是443端口)
14.已申请到免费一年的ssl证书(wx.feiit.top.pem,wx.feiit.top.key,域名已配置解析)
想问下如何解决(可提供服务器ip,密码远程协助),困扰了很久,希望能有好心人帮帮我,感激不尽