准备工作,停止正在运行的nginx
d
1.进入nginx源码文件夹,修改nginx编译配置
./configure --prefix=/usr/local/nginx --conf-path=/usr/local/nginx/conf/nginx.conf --pid-path=/usr/local/nginx/conf/nginx.pid --lock-path=/usr/local/nginx/lock/nginx.lock --with-http_ssl_modul
2.配置完成后,重新make编译
make
3.将编译好的nginx覆盖旧版本
cp ./objs/nginx /usr/local/nginx/sbin/