Error during nginx restart
Francis Daly
francis at daoine.org
Sun Feb 9 09:34:02 UTC 2020
On Fri, Feb 07, 2020 at 03:07:50PM +0100, Antony wrote:
Hi there,
> In the official Lemonldap installation documentation, there is this
> command: "ln -s /etc/lemonldap-ng/nginx-lmlog.conf
> /etc/nginx/conf.d/llng-lmlog.conf".
Can you give a link to that documentation; and maybe to the content of
the config files?
> The problem is that when the symbolic link between the two files is
> created, if I want to restart nginx this is impossible because an error
> appears: duplicate "log_format" name "lm_combined" in
> /etc/lemonldap-ng/nginx-lmlog.conf
>
> Do you have a solution for me?
My guess is that one part of a config file does "include
/etc/lemonldap-ng/nginx-lmlog.conf"; and another part does "include
/etc/nginx/conf.d/*.conf".
With the symlink in place, the same contents are included twice; and
they have a piece that must only exist once.
If that is the case, then omitting the symlink should work -- the explicit
"include /etc/lemonldap-ng/nginx-lmlog.conf" should get the content in
the right place once.
With a working config file, "nginx -T" can help -- perhaps with "|
grep include" or "| grep '^# con'" -- to see what file are read.
Without a working config file, something like "grep include nginx.conf"
can show the first set of extra files that will be read. Duplicates
there are probably bad.
Good luck with it,
f
--
Francis Daly francis at daoine.org
More information about the nginx
mailing list