duplicated directive on reverse proxy

Francis Daly francis at daoine.org
Tue Jun 12 17:11:53 UTC 2012


On Tue, Jun 12, 2012 at 09:57:20AM -0400, oreaseca wrote:

Hi there,

> error_log       /var/log/nginx/www.DOMAIN.gov.br-error.log;
> server {

Quite possibly, just swapping those two lines will make things do what
you want.

> root at proxy01:/etc/init.d# /etc/init.d/nginx start
> Starting nginx: [emerg]: "error_log" directive is duplicate in
> /etc/nginx/sites-enabled/www.DOMAIN.gov.br:1
> configuration file /etc/nginx/nginx.conf test failed

error_log only takes a single value at one level.

Your "include" is at http level, so that's where your error_log currently
is. As soon as you put a second error_log at http level, you'll see the
error message.

Put the error_log line at server level, and it should just Work.

	f
-- 
Francis Daly        francis at daoine.org



More information about the nginx mailing list