nginx configure check fault?

Maxim Dounin mdounin at mdounin.ru
Thu Aug 20 12:28:44 MSD 2009


Hello!

On Thu, Aug 20, 2009 at 03:49:33PM +0800, lhmwzy wrote:

> Like this:
> 
> ....
>     server {
>         listen       80;
>         server_name  10.66.23.98 boy.zeuscn.com;
> 
>         #charset koi8-r;
> 
>         #access_log  /var/log/nginx-access.log;
>         access_log off
> 
>         root /usr/www/webroot;
> 
>         index  index.php index.html index.htm;
> ..........
> 
> nginx syntax check pass OK.

Patch.

--- a/src/http/modules/ngx_http_log_module.c
+++ b/src/http/modules/ngx_http_log_module.c
@@ -835,7 +835,7 @@ ngx_http_log_set_log(ngx_conf_t *cf, ngx

     value = cf->args->elts;

-    if (ngx_strcmp(value[1].data, "off") == 0) {
+    if (cf->args->nelts == 2 && ngx_strcmp(value[1].data, "off") == 0) {
         llcf->off = 1;
         return NGX_CONF_OK;
     }

Maxim Dounin





More information about the nginx mailing list