yuhvv 发表于 2020-3-23 17:50:09

LNMP ngx_lua_waf waf

nginx.conf
fastcgi_connect_timeout 300;
      fastcgi_send_timeout 300;
      fastcgi_read_timeout 300;
      fastcgi_buffer_size 64k;
      fastcgi_buffers 4 64k;
      fastcgi_busy_buffers_size 128k;
      fastcgi_temp_file_write_size 256k;

      gzip on;
      gzip_min_length1k;
      gzip_buffers   4 16k;
      gzip_http_version 1.1;
      gzip_comp_level 2;
      gzip_types   text/plain application/javascript application/x-javascript text/javascript text/css application/xml application/xml+rss;
      gzip_vary on;
      gzip_proxied   expired no-cache no-store private auth;
      gzip_disable   "MSIE \.";

      #limit_conn_zone $binary_remote_addr zone=perip:10m;
      ##If enable limit_conn_zone,add "limit_conn perip 10;" to server section.

      server_tokens off;
        lua_package_path"/usr/local/nginx/conf/waf/?.lua";
      lua_shared_dict limit 10m;
      init_by_lua_file/usr/local/nginx/conf/waf/init.lua;
      access_log off;

server {
listen 443 default_server;
server_name _;

报错 nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed
是什么原因呢

licess 发表于 2020-3-24 09:06:40

如果上面贴出的就是全部配置文件内容,肯定是不全的,肯定会报错,下载lnmp的安装重新拷贝安装包 conf/nginx.conf 文件覆盖现在的nginx.conf

配置文件有错误nginx -t 时在 nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed 前面通常都会显示具体错误信息

页: [1]
查看完整版本: LNMP ngx_lua_waf waf