$ systemctl restart nginx
Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.
$ nginx -t
nginx: [emerg] unknown directive "stream" in /etc/nginx/nginx.conf:29
nginx: configuration file /etc/nginx/nginx.conf test failed
看错误提示是不能识别stream指令,但是执行了nginx -V后,发现输出内容有相关的stream模块,这就使我很困惑,为啥nginx识别不到呢?
经过查资料和尝试,发现安装nginx-mod-stream这个库可以解决这个问题:
$ sudo yum install nginx-mod-stream
$ nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
欢迎光临 黑帽联盟 (https://bbs.cnblackhat.com/) | Powered by Discuz! X2.5 |