CoolCold
December 18, 2010 09:48PM
Hello Nginx-ru,

На простейшей конфигурации вида:
ngnxtest:/tmp/keke/nginx-0.8.54# cat /etc/nginx/sites-enabled/000-1test.conf
upstream bla
{
server yandex.ru weight=1 max_fails=1 fail_timeout=20s;
server rambler.ru weight=1 max_fails=1 fail_timeout=20s;
server mail.ru weight=1 max_fails=1 fail_timeout=20s;
}

server {
listen 80;
server_name testhost.ru www.testhost.ru;

location / {
proxy_pass http://bla;
}
}

ngnxtest:/tmp/keke/nginx-0.8.54# cat /etc/nginx/sites-enabled/000-2test.conf

server {
listen 80;
server_name tst.otherhost.ru;
location / {
proxy_pass http://bla;
}
}

При тесте конфига получаю сообшение об ошибке:
ngnxtest:/tmp/keke/nginx-0.8.54# objs/nginx -t
[emerg]: invalid parameter "weight=1" in /etc/nginx/sites-enabled/000-1test.conf:3
configuration file /etc/nginx/nginx.conf test failed

Проверено на 0.7.67,0.7.68,0.8.54

ngnxtest:/tmp/keke/nginx-0.8.54# objs/nginx -V
nginx version: nginx/0.8.54
built by gcc 4.3.2 (Debian 4.3.2-1.1)
TLS SNI support enabled
configure arguments: --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-log-path=/var/log/nginx/access.log --http-proxy-temp-path=/var/lib/nginx/proxy --lock-path=/var/lock/nginx.lock --pid-path=/var/run/nginx.pid --with-debug --with-http_dav_module --with-http_flv_module --with-http_geoip_module --with-http_gzip_static_module --with-http_realip_module --with-http_stub_status_module --with-http_ssl_module --with-http_sub_module --with-ipv6 --with-mail --with-mail_ssl_module

Все версии собирались с одинаковыми параметрами.
Похоже что проблема проявляется при include /path/*;
Если во втором конфиге (000-2test.conf) заменить url для апстрима, то ругань на первый конфиг пропадает.

Полные конфиги в аттаче.

--

Best regards,
CoolCold [COOLCOLD-RIPN]_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://nginx.org/mailman/listinfo/nginx-ru
Attachments:
open | download - nginxconf.tar.gz (5.2 KB)
Subject Author Posted

[bug] парсинг конфига - ошибка для upstream {} Attachments

CoolCold December 18, 2010 09:48PM

Re: [bug] парсинг конфига - ошибка для upstream {}

Maxim Dounin December 19, 2010 06:18AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 265
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready