dynamic logs

Vladan Popovic vladanpopovic at be-o.com
Fri Sep 12 02:51:34 MSD 2008


Igor Sysoev <is at ...> writes:

> 
> On Thu, Sep 11, 2008 at 08:15:30PM +0000, Vladan Popovic wrote:
> 
> > Hi,
> > I'm using version 0.716 and trying to make dynamic log files work.
> > The log file is created but subsequently nothing is written inside the file.
> > The configuration is as follows:
> > # Catch all web site
> > #
> > server {
> >         server_name _ ;
> > 
> >         location  /widgets/ { alias  /home/http/lib/widgets/; }
> >         rewrite ^/crm/(.*)$ https://$host/crm/$1 permanent;
> > 
> >         if ($host ~* "^([^.]+(\.[^.]+)*)\.((.*)\.(com|net|org)(\..*)?)$"){
> >                 set $subd $1;
> >                 set $dom  $3;
> >                 set $myroot /sites/$dom/$subd/htdocs ;
> >         }
> > 
> >         location / {
> >            index  index.php index.html index.htm;
> >         }
> > 
> >         root            /home/http$myroot ;
> >         include         php-fastcgi;
> > 
> >         access_log  /var/log/nginx/$dom debug ;
> > 
> > }
> > 
> > 
> > I get an error as follows:
> > 2008/09/12 02:06:19 [alert] 9832#0: *6 write() to "/var/log/nginx/be-o.com"
> > failed (22: Invalid argument) while logging request, 
> 
> Could you run nginx using truss/ktrace/strace and try the request ?
Hello Igor,
I am sorry but I don't know these tools - i never used them and don't really
know what I should do with them.
I am using Ubuntu 8.04 and strace is present so I ran it but it generated a log
of text on the screen that I didn't understand.
The user that is the owner of the log file is www-data and I did 'su www-data'
and then I could write in the log file manually so the problem doesn't seem
related to user rights.

Best Regards

Vladan

 









More information about the nginx mailing list