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

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

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


版权声明:本文为xqnode原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。