Dor*_*ora 15 nginx openresty web-application-firewall
在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将获得两个成功,但是我的是成功和失败。
Ste*_*rov 27
只需在行events { }上方添加即可http {。
//此评论对我有用。
Dyl*_*n B 26
放在 http{} 上面
events {
worker_connections 1024;
}
Run Code Online (Sandbox Code Playgroud)
Nginx worker_connections :设置工作进程可以打开的最大同时连接数。
| 归档时间: |
|
| 查看次数: |
11363 次 |
| 最近记录: |