在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将获得两个成功,但是我的是成功和失败。