Nginx currently will not start due to the error mentioned in the title. Here's the actual error I'm getting:

$ 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

And this is immediately following creating the VM in question (www.myhashimotosthyroiditis.com), using a template I found here that was supposedly the "out-of-the-box-for-lazy-people" templates.

I'm very new to Nginx and I could not find any helpful information via google or searching here, so I beg my pardon if this is a product of stupidity.

Here is the entirety of the VM file:

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;

It sounds like you haven't defined the limit_req_zone in http{} block.

  • That was it. in the /etc/nginx/nginx.conf file. Thanks!
    – Garrett
    Apr 15 '12 at 21:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.