VPS侦探论坛

 找回密码
 注册
查看: 2546|回复: 1

LNMP ngx_lua_waf waf

[复制链接]
发表于 2020-3-23 17:50:09 | 显示全部楼层 |阅读模式

  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_length  1k;
        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 [1-6]\.";

        #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
是什么原因呢

美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 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 前面通常都会显示具体错误信息

Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-21 19:29 , Processed in 0.025375 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表