微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

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.

原文地址:https://www.jb51.cc/nginx/435183.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐