4 messages in ru.sysoev.nginxlocation "default" documentation
FromSent OnAttachments
James ByersJan 13, 2009 9:39 pm 
Igor SysoevJan 14, 2009 6:00 am 
James ByersJan 14, 2009 8:33 am 
Igor SysoevJan 14, 2009 8:49 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:location "default" documentationActions...
From:James Byers (jby@gmail.com)
Date:Jan 13, 2009 9:39:47 pm
List:ru.sysoev.nginx

I had some trouble setting the "deferred" option on a listen directive, related to the use of "default". If someone can help me understand this better, I'll update the English documentation.

Our configuration has many server blocks, which look like the example below. My first attempt was to append "deferred" to all of the listen lines. This resulted in the error: '"deferred" parameter can be specified for the default "listen" directive only'. My second attempt was to put "deferred" only on the first entry in each server block, thinking it was the implicit default. Same error. When explicitly specifying the default, as in "listen 1.2.3.4:80 default deferred;" in each server block, all's well.

Two questions:

1. Is this setting "deferred" for all of the listen directives in the server block? If not, how can this be done? 2. What does "default" actually do? The docs for listen say:

'If the directive has the "default" parameter, then the enclosing server {...} block will be the default server for the address:port pair. If there are no directives with the "default" parameter, then the default server will be the first server in which the address:port pair appears.'

This suggests multiple server blocks can have the same address:port, with one server block being the default. I can imagine a use for the with wildcard addresses, but not with explicit addresses. And I'm left wondering how to set all sockets to deferred.

Thanks, James

server { listen 1.2.3.4:80; listen 5.6.7.8:80; ... } server { listen 1.2.3.4:443; listen 5.6.7.8:443; ... }