Welcome! Log In Create A New Profile

Advanced

Re: either error log empty or access log empty

Francis Daly
March 24, 2012 08:48AM
On Fri, Mar 23, 2012 at 08:48:11PM -0400, zhnupy wrote:

Hi there,

> eventhough I have similar log configuration on all virtual hosts either
> access.log is always empty or error.log is always empty on each virtual
> hosts.

I fail to reproduce the problem you report with the configuration you
provide.

> I better explain with facts, this is nginx configuration ( I'm just
> copying relevant parts please disregard any syntax error I might have
> introduced by doing this) :

Either you've left out a relevant part, or there is some other difference
in our test cases. nginx -V, perhaps?

Can you provide a (minimal) config that shows the problem for you?

> Now, I use wget to make a request for a non existent file and get a 404
> response
>
> wget http://www.HOST_A.com/nonexistentfile.php
> wget http://www.HOST_B.com/nonexistentfile.php
> wget http://www.HOST_C.com/nonexistentfile.php
>
> ls command output shows that for HOST_A only error.log gets updated, and
> for HOST_B and HOST_C only access.log gets updated

If nginx returns 404, access_log should be written.

For HOST_A, have you any other access_log defined that is used instead?

If nginx tries to read a missing file, error_log should be
written. "try_files" and "fastcgi_pass" don't involve nginx trying to
read a file. Are you using either of those in the HOST_B and HOST_C
configs? Or have you any other error_log defined?

> I'd deeply appreciate any suggestions on this issue

More information needed; ideally a config that you confirm shows the
problem. Does it fail with only one server{} block? Or with two?

f
--
Francis Daly francis@daoine.org

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

either error log empty or access log empty

zhnupy March 23, 2012 08:48PM

Re: either error log empty or access log empty

Francis Daly March 24, 2012 08:48AM

Re: either error log empty or access log empty

zhnupy March 25, 2012 04:20PM

Re: either error log empty or access log empty

Francis Daly March 25, 2012 06:14PM

Re: either error log empty or access log empty

zhnupy March 25, 2012 08:38PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 166
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready