unknown directive “stream” in /usr/local/nginx

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/xqnode/article/details/83062033

nginx默认安装的时候无法加载流stream模块,需要早启动参数里加上–with-stream。

解决方法:
重新对源文件进行编译、安装,通过添加–with-stream参数指定安装stream模块。

[root@localhost nginx-1.12.2]# ./configure --with-stream
[root@localhost nginx-1.12.2]# make & make install

再次检查nginx.conf配置文件,确认配置无语法错误后,再次尝试启动服务。

[root@localhost sbin]# ./nginx

这个时候就可以启动成功了。

猜你喜欢

转载自blog.csdn.net/xqnode/article/details/83062033