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
1
2
再次检查nginx.conf配置文件,确认配置无语法错误后,再次尝试启动服务。

[root@localhost sbin]# ./nginx
1
这个时候就可以启动成功了。

原文地址:https://www.cnblogs.com/eyesfree/p/15179986.html