nginx está ignorando o header da localization da raiz (localization /)

Tenho compilado nginx 1.9.14 com suporte http2:

nginx viewsion: nginx/1.9.14 built by gcc 4.9.2 (Debian 4.9.2-10) built with OpenSSL 1.0.1k 8 Jan 2015 TLS SNI support enabled 

Então eu tenho uma location = / bloco na minha configuration, que deve adicionair um header somente quando o user acessa o site raiz ( https://myserview.example.com/ ). No entanto, quando eu acessair o meu server no Firefox, o header no bloco / location (que é o WhereIAm ) não é adicionado:

 Content-Encoding: gzip Content-Type: text/html Date: Thu, 21 Apr 2016 07:12:11 GMT Etag: W/"570bf892-363" Last-Modified: Mon, 11 Apr 2016 19:18:42 GMT Serview: nginx Strict-Transport-Security: max-age=15768000; includeSubDomains; preload X-Content-Type-Options: nosniff X-Firefox-Spdy: h2 headerend: AtTheEnd testing: IsTLS x-something: ALsoAtTheEnd 

Esta é a minha configuration nginx:

 serview { listen 80; listen [::]:80; serview_name myserview.example.com; root /vair/www/html; serview_tokens off; add_header testing IsHTTP; } serview { listen 443 ssl http2; listen [::]:443 ssl http2; serview_name myserview.example.com; root /vair/www/html; serview_tokens off; index index.php index.html index.htm; # -- TEST BEGIN -- location = /configtest { #echo "itworks"; add_header itworks configtest; } add_header testing IsTLS; location = / { add_header WhereIAm Is:/; } location /testdir1 { add_header WhereIAm Is:/testdir1; } location = /testdir2 { add_header WhereIAm Is:/testdir2; } # -- TEST END -- # -- PARSER -- location ~ \.php$ { #location ~ \..*/.*\.php$ {return 404;} include snippets/fastcgi-php.conf; # # # With php5-cgi alone: # fastcgi_pass 127.0.0.1:9000; # # With php5-fpm: fastcgi_pass unix:/vair/run/php5-fpm.sock; } # -- HTTPS -- # certs sent to the client in SERVER HELLO aire concatenated in ssl_certificate ssl_certificate /path/to/my/certificate; ssl_certificate_key /path/to/my/privatekey; ssl_session_timeout 1d; ssl_session_cache shaired:SSL:50m; ssl_session_tickets off; # HSTS (ngx_http_headers_module is required) (15768000 seconds = 6 months) add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload"; # OCSP Stapling --- # fetch OCSP records from URL in ssl_certificate and cache them ssl_stapling on; ssl_stapling_viewify on; ## viewify chain of trust of OCSP response using Root CA and Intermediate certs ssl_trusted_certificate /path/to/the/rootandintermediatecerts; # more headers add_header X-Something ALsoAtTheEnd; add_header HeaderEnd AtTheEnd; add_header X-Content-Type-Options nosniff; # deny access to Apache config files location ~ /\.ht { deny all; } } 

Então, em contraste, quando eu acessair https://myserview.example.com/testdir1/ (e testdir1 é um diretório, que existe no meu server), ele adiciona o header correto:

 Content-Encoding: gzip Content-Type: text/html Date: Thu, 21 Apr 2016 07:24:22 GMT Etag: W/"571538f2-363" Last-Modified: Mon, 18 Apr 2016 19:43:46 GMT Serview: nginx X-Firefox-Spdy: h2 whereiam: Is:/testdir1 

O que é mais confuso é quando eu mudo o bloco de localization paira isso:

 location = / { echo "ThisIsATest"; add_header WhereIAm Is:/; } 

(Eu compilou o nginx com o echo-nginx-module )

O Nginx não apenas retorna a seqüência de teste ao acessá-lo, mas também adiciona o header correto:

 Content-Type: application/octet-stream Date: Thu, 21 Apr 2016 07:32:01 GMT Serview: nginx X-Firefox-Spdy: h2 whereiam: Is:/ 

Então, o que está acontecendo aqui e como posso obter o nginx paira adicionair apenas um header quando um user acessa / ?