Назад | Перейти на главную страницу

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

И это происходит сразу после создания рассматриваемой виртуальной машины (www.myhashimotosthyroiditis.com) с использованием шаблона Я нашел здесь это якобы были шаблоны "из коробки для ленивых".

Я новичок в Nginx и не смог найти никакой полезной информации через Google или поиск здесь, поэтому прошу прощения, если это продукт глупости.

Вот полный файл виртуальной машины:

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;
}

Похоже, вы не определили limit_req_zone в http{} блок.