Nginx未知limit_req_zone

由于标题中提到的错误,Nginx目前无法启动.这是我得到的实际错误

$sudo /etc/init.d/Nginx restart
Restarting Nginx: Nginx: [emerg] unkNown limit_req_zone "one" in /etc/Nginx/sites-enabled/www.myhashimotosthyroiditis.com:15
Nginx: configuration file /etc/Nginx/Nginx.conf test Failed

这是在创建有问题的VM(www.myhashimotosthyroiditis.com)后立即使用模板I found here,该模板被认为是“开箱即用的懒人”模板.

我对Nginx很新,我在谷歌找不到任何有用的信息或在这里搜索,所以如果这是愚蠢的产物,请原谅.

这是整个VM文件

server {
        listen 80;

        server_name myhashimotosthyroiditis.com www.myhashimotosthyroiditis.com;

        root /var/www/myhashimotosthyroiditis;

        access_log /var/log/Nginx/myhashimotosthyroiditis.access.log;
        error_log /var/log/Nginx/myhashimotosthyroiditis.error.log;

        location / {
                try_files $uri $uri/ /index.PHP;
        }

        location /search { limit_req zone=one burst=3 nodelay; rewrite ^ /index.PHP; }

        fastcgi_intercept_errors off;

        location ~* \.(?:ico|css|js|gif|jpe?g|png)${
                expires max;
                add_header Pragma public;
                add_header Cache-Control "public,must-revalidate,proxy-revalidate";
        }

        include PHP.conf;

        # You may want to remove the robots line from drop to use a virtual robots.txt
        # or create a drop_wp.conf tailored to the needs of the wordpress configuration
        include drop.conf;
}
听起来你还没有在http {}块中定义limit_req_zone.

相关文章

Nginx (engine x) 是一个高性能的HTTP和反向代理服务,也是一...
本地项目配置 1 复制 luffy/settings/dev.py为prop.py 修改l...
nginx不仅可以隐藏版本信息,还支持自定义web服务器信息 先看...
一 、此次漏洞分析 1 nginx HTTP/2漏洞 [nginx-announce] ng...
###进入nginx 目录cd /usr/local/nginx###递归显示 2 级目录...
在cmd命令窗口输入下面命令进行查看 tasklist /fi "ima...