首先使用nginx -V查看自己现在的配置参数
然后复制现在现有的配置参数,然后cd到nginx的安装包里
--prefix=/usr/local/nginx --with-http_ssl_module #原来的参数
./configure --prefix=/usr/local/nginx --with-http_ssl_module --with-http_stub_status_module #重新配置 将原来的参数黏贴上并添加新的功能模块
然后make
make后不要make install
然后make
安装包的objs目录下会有一个新的nginx文件 覆盖之前的nginx就可以了
然后nginx -V 看到已经添加上了新的模块