﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	uname	nginx_version
137	"The ""test configuration""/"" -t "" option does not check files included from ""sites-available"""	Peter Haggerty	somebody	"First things first. I love nginx! This is some really nice work yall have done, so Thank You! :)

The ""test configuration""/"" -t "" option does not check files included from ""sites-available""

To replicate:
mkdir -p /etc/nginx/bad-config/
echo ""any random non-valid nginx configuration"" > /etc/nginx/bad-config/1.txt

In your nginx.conf:
  include /etc/nginx/bad-config/1.txt;

Run nginx with -t and you get the expected response:
nginx: [emerg] unexpected end of file, expecting "";"" or ""}"" in /etc/nginx/bad-config/1.txt:2

Now, copy that bad configuration file into the sites-available directory and comment out the include line for that file.
cp /etc/nginx/bad-config/1.txt /etc/nginx/sites-available/

In your nginx.conf:
  #include /etc/nginx/bad-config/1.txt;

Verify the file is there:
ls -laF /etc/nginx/sites-available/1.txt 

Run nginx -t again
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok

Putting files in sites-available appears to cloak them from syntax checking.
This is really a problem as all of our virtual hosts are in the sites-available directory

"	defect	closed	major		nginx-core	1.0.x	invalid		peter@…	Linux ip-10-99-90-255 2.6.38-11-virtual #50-Ubuntu SMP Mon Sep 12 21:51:23 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux	"nginx version: nginx/1.0.14
built by gcc 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4) 
TLS SNI support enabled
configure arguments: --prefix=/opt/nginx-1.0.14 --conf-path=/etc/nginx/nginx.conf --without-http_fastcgi_module --without-http_scgi_module --without-http_uwsgi_module --with-http_addition_module --with-http_gzip_static_module --with-http_realip_module --with-http_ssl_module --with-sha1=/usr/include/openssl --with-md5=/usr/include/openssl"
