Starting nginx: 2009/03/13 15:26:32 [emerg] 4382#0: unknown log format "main"

Maxim Dounin mdounin at mdounin.ru
Sat Mar 14 14:03:05 MSK 2009


Hello!

On Fri, Mar 13, 2009 at 03:26:50PM -0700, Payam Chychi wrote:

> Im using the latest nginx 4.
> Here is the error that I am getting:
> 
> Starting nginx: 2009/03/13 15:19:55 [emerg] 4378#0: unknown log format
> "main" in /etc/nginx/sites-enabled/p1/payam_70.33.253.5.conf:21
> 
> 
> My Main nginx.conf config:
> 
> user  www-data;

[...]

> http {
> 
>     include    proxy.conf;
> 
>     include       mime.types;
> 
>     include /etc/nginx/sites-enabled/p1/*.conf;
> 
>     include /etc/nginx/sites-enabled/ypf/*.conf;

Includes with servers{} using log_format main are above definition 
of log_format.  You should move them below.

[...]

>     log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
> 
>                       '"$status" $body_bytes_sent "$http_referer" '
> 
>                       '"$http_user_agent" "$http_x_forwarded_for"';

[...]

Maxim Dounin





More information about the nginx mailing list