Hello,
Here is a patch against 0.8.50 to only complain when the listen options are actually different.
Would folks be interested in this?
[code]
$ svn diff -r 32178:32179 src/http/ngx_http.c
Index: src/http/ngx_http.c
===================================================================
--- src/http/ngx_http.c (revision 32178)
+++ src/http/ngx_http.c (revision 32179)
@@ -1273,9 +1273,35 @@
if (lsopt->set) {
if (addr[i].opt.set) {
- ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
- "a duplicate listen options for %s", addr[i].opt.addr);
- return NGX_ERROR;
+ /*
+ * If this set is not the same as the old set, complain
+ */
+ if ((lsopt->default_server != addr[i].opt.default_server)
+ || (lsopt->bind != addr[i].opt.bind)
+ || (lsopt->wildcard != addr[i].opt.wildcard)
+#if (NGX_HTTP_SSL)
+ || (lsopt->ssl != addr[i].opt.ssl)
+#endif
+#if (NGX_HAVE_INET6 && defined IPV6_V6ONLY)
+ || (lsopt->ipv6only != addr[i].opt.ipv6only)
+#endif
+ || (lsopt->backlog != addr[i].opt.backlog)
+ || (lsopt->rcvbuf != addr[i].opt.rcvbuf)
+ || (lsopt->sndbuf != addr[i].opt.sndbuf)
+#if (NGX_HAVE_SETFIB)
+ || (lsopt->setfib != addr[i].opt.setfib)
+#endif
+#if (NGX_HAVE_DEFERRED_ACCEPT && defined SO_ACCEPTFILTER)
+ || (ngx_strcmp(lsopt->accept_filter, addr[i].opt.accept_filter) != 0)
+#endif
+#if (NGX_HAVE_DEFERRED_ACCEPT && defined TCP_DEFER_ACCEPT)
+ || (lsopt->deferred_accept != addr[i].opt.deferred_accept)
+#endif
+ || (ngx_strcmp(lsopt->addr, addr[i].opt.addr) != 0)) {
+ ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
+ "conflicting listen options for %s", addr[i].opt.addr);
+ return NGX_ERROR;
+ }
}
addr[i].opt = *lsopt;
[/code]