nginx: [emerg] no "events" section in configuration

添加events,如下图

http {
      include mime.types;
      default_type application/octet-stream;
      keepalive_timeout 65;
      server {
           listen 80;
            server_name localhost;
            location / {
              root html;
             index index.html index.htm;
            }
      }
}
 events {
            worker_connections  1024;    #nginx的最大并发访问量
            use epoll;    #异步IO
        }
posted @ 2022-12-06 18:57  .jx  阅读(2707)  评论(0)    收藏  举报