I have two nginx vhosts enabled:
site 1)
…
server {
server_name test1.loc;
listen 10.0.0.1:443;
listen [2001:xxx:xxxx:xxx::1]:443 ipv6only=on;
…
site 2)
…
server {
server_name test2.loc;
listen 10.0.0.1:443 default;
# listen [2001:xxx:xxxx:xxx::1]:443 ipv6only=on;
…[code]
With this config, if I start nginx,
service nginx start
Shutting down nginx done
Starting nginx done
all’s well.
But, if for site 2) I enable the IPv6 listener,
listen [2001:xxx:xxxx:xxx::1]:443 ipv6only=on;
listen [2001:xxx:xxxx:xxx::1]:443 ipv6only=on;
Now, @ nginx start,
service nginx start
Starting nginx nginx: [emerg] duplicate listen options for
[2001:xxx:xxxx:xxx::1]:443 in
/usr/local/etc/nginx/sites-enabled/test2.loc.conf:21
startproc: exit status of parent of /usr/local/sbin/nginx: 1
[2001:xxx:xxxx:xxx::1]:443 in
/usr/local/etc/nginx/sites-enabled/test2.loc.conf:21
startproc: exit status of parent of /usr/local/sbin/nginx: 1
failed
Is this a bug, feature or config problem?
Module ngx_http_core_module
A listen directive can have several additional parameters specific to
system calls listen() and bind(). They can be specified in any listen
directive, but only once for the given address:port pair.
While some ‘additional parameters’ on the listen line are restricted in
this manner, others – e.g., ssl, spdy – are not, and can appear
multiple times.
this manner, others – e.g., ssl, spdy – are not, and can appear
multiple times.
You should read docs more careful. Module ngx_http_core_module
ssl this parameter (0.7.14) does not relate to system calls listen()
and bind(),
but allows to specify that all connections accepted on this port
should work in the SSL mode.
–
WNGS-RIPE
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.