加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 运营中心 > Nginx > 正文

Nginx未知limit_req_zone

发布时间:2020-12-13 21:11:14 所属栏目:Nginx 来源:网络整理
导读:由于标题中提到的错误,Nginx目前无法启动.这是我得到的实际错误: $sudo /etc/init.d/nginx restartRestarting nginx: nginx: [emerg] unknown limit_req_zone "one" in /etc/nginx/sites-enabled/www.myhashimotosthyroiditis.com:15nginx: configuration f

由于标题中提到的错误,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.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读