2019/01/19 16:24:22 [emerg] 11172#0: the "ssl" parameter requires ngx_http_ssl_module in /usr/local/nginx/conf/nginx.conf:75
现在软件安装位置
/usr/local/nginx
源码软件保存位置
cd /usr/local/jysemel/nginx/nginx-1.13.7
./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module
make
同步之前记得做好备份、同时kill现在nginx进程
cp ./objs/nginx /usr/local/nginx/sbin/
切换到现在软件位置
cd /usr/local/nginx/sbin/
启动
./nginx
由于本人是通过腾讯云注册域名的,具体ssl证书申请和配置,还请参照腾讯云官网手册
server {
listen 443 ssl;
server_name jysemel.xyz; #本人域名
ssl_certificate 1_jysemel.xyz_bundle.crt; #证书秘钥
ssl_certificate_key 2_jysemel.xyz.key; #证书秘钥key
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; #按照这个协议配置
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE; #按照这个套件配置
ssl_prefer_server_ciphers on;
location / {
proxy_pass http://127.0.0.1:8082;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
cd sbin/
./nginx -s reload