Re: nginx-1.6.2 Ошибочный синтаксис в конфигурации

Dmitriy Lyalyuev dmitriy at lyalyuev.info
Wed Oct 8 08:42:20 UTC 2014


Добрый день.

Может дело в отсутствии точки с запятой в конце предыдущей строки?


08.10.2014 11:35, vvmluxsite пишет:
> server (
> ...
>      index index.html
>      include     include.conf;
> ....
> }
>
> Результат:
>
> Performing sanity check on nginx configuration:
> nginx: the configuration file /usr/local/etc/nginx/nginx.conf syntax is ok
> nginx: configuration file /usr/local/etc/nginx/nginx.conf test is
> successful
>
>
> Вместо индекса другая директива, например:
> server (
> ...
>      error_log /var/log/nginx/error_qqq.log
>      include     include.conf;
> ....
> }
> даёт такой результат:
>
> Performing sanity check on nginx configuration:
> nginx: [emerg] invalid log level "include" in
> /usr/local/etc/nginx/vhosts/sites-enabled/sites.conf:15
>
>
> Теперь error_log после индекса:
> server (
> ...
>      index index.html
>      error_log /var/log/nginx/error_qqq.log
>      include     include.conf;
> ....
> }
> Получается:
>
> Performing sanity check on nginx configuration:
> nginx: [warn] only the last index in "index" directive should be absolute in
> /usr/local/etc/nginx/vhosts/sites-enabled/sites.conf:15
> nginx: the configuration file /usr/local/etc/nginx/nginx.conf syntax is ok
> nginx: configuration file /usr/local/etc/nginx/nginx.conf test is
> successful
>
>
> Просто "f":
> server (
> ...
>       index index.html
> #    error_log /var/log/srv_www/nginx/error_qqq.log
>      f
>      include     include.conf;
> ....
> }
> Такой результат:
>
> Performing sanity check on nginx configuration:
> nginx: the configuration file /usr/local/etc/nginx/nginx.conf syntax is ok
> nginx: configuration file /usr/local/etc/nginx/nginx.conf test is
> successful
>
> Если включить "error_log" из последнего примера:
> Performing sanity check on nginx configuration:
> nginx: [warn] only the last index in "index" directive should be absolute in
> /usr/local/etc/nginx/vhosts/sites-enabled/sites.conf:16
> nginx: the configuration file /usr/local/etc/nginx/nginx.conf syntax is ok
> nginx: configuration file /usr/local/etc/nginx/nginx.conf test is
> successful
>
> Тут 16-я строка: include     include.conf;
>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?21,253828,253828#msg-253828
>
> _______________________________________________
> nginx-ru mailing list
> nginx-ru at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-ru



Подробная информация о списке рассылки nginx-ru