小编Dor*_*ora的帖子

Nginx启动提示[emerg]配置中没有“事件”部分

在X-WAF部署中,您需要创建一个新的nginx配置文件。但是,在测试nginx配置时,会发现错误并且无法启动nginx。

我参考http://blog.51cto.com/14071176/2318054吗?我根据文章中的配置逐步进行了操作,但是我遇到了问题。

root@VM-0-6-ubuntu:~# /usr/local/openresty/nginx/sbin/nginx -t
nginx: the configuration file /usr/local/openresty/nginx/conf/nginx.conf syntax is ok
nginx: [emerg] no "events" section in configuration
nginx: configuration file /usr/local/openresty/nginx/conf/nginx.conf test failed

root@VM-0-6-ubuntu:~# /usr/local/openresty/nginx/sbin/nginx
nginx: [emerg] no "events" section in configuration
Run Code Online (Sandbox Code Playgroud)

在正常情况下,执行/ usr / local / openresty / nginx / sbin / nginx -t将获得两个成功,但是我的是成功和失败。

nginx openresty web-application-firewall

15
推荐指数
2
解决办法
1万
查看次数