lhmwzy
August 20, 2009, 9:57am
1
I write “access_log off” in the configure file,nginx does not complain
syntax error.
It should “access_log off;”,am I right?
Does nginx can not check out this syntax error?
nginx -V
nginx version: nginx/0.8.7
configure arguments: --prefix=/usr/local/etc/nginx --with-cc-opt=’-I
/usr/local/include’ --with-ld-opt=’-L /usr/local/lib’
–conf-path=/usr/local/etc/nginx/nginx.conf
–sbin-path=/usr/local/sbin/nginx --pid-path=/var/run/nginx.pid
–error-log-path=/var/log/nginx-error.log --user=www --group=www
–http-client-body-temp-path=/var/tmp/nginx/client_body_temp
–http-proxy-temp-path=/var/tmp/nginx/proxy_temp
–http-fastcgi-temp-path=/var/tmp/nginx/fastcgi_temp
–http-log-path=/var/log/nginx-access.log
–add-module=/usr/ports/www/nginx-devel/work/nginx-accesskey-2.0.3
–with-http_addition_module --with-http_realip_module
–add-module=/usr/ports/www/nginx-devel/work/ngx_http_response-0.3
–with-http_secure_link_module --with-http_ssl_module
–with-http_stub_status_module --with-http_sub_module
–add-module=/usr/ports/www/nginx-devel/work/ngx_http_upstream_keepalive-0.1
–with-pcre
lhmwzy
August 20, 2009, 10:01am
2
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.
lhmwzy
August 20, 2009, 10:36am
3
On Thu, Aug 20, 2009 at 03:49:33PM +0800, lhmwzy wrote:
access_log off
root /usr/www/webroot;
index index.php index.html index.htm;
…
nginx syntax check pass OK.
The attached pacth should fix the bug.
lhmwzy
August 20, 2009, 10:36am
4
Hello!
On Thu, Aug 20, 2009 at 03:49:33PM +0800, lhmwzy wrote:
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 D.
lhmwzy
August 23, 2009, 1:48am
5
TKS igor,It works!
2009/8/20 Igor S. [email protected] :