Nginx未知limit_req_zone

前端之家收集整理的这篇文章主要介绍了Nginx未知limit_req_zone前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

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

@H_301_6@$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文件

@H_301_6@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.f2er.com/nginx/435183.html

猜你在找的Nginx相关文章