multiple listen directives

Igor Sysoev igor at sysoev.ru
Mon Sep 16 12:17:16 UTC 2013


On Sep 16, 2013, at 16:11 , Axel wrote:

> Hi all,
> 
> I want to build an active/active cluster and therefore configure nginx to listen on multiple IP adresses.
> 
> I read http://nginx.org/en/doc/http/ngx_http_core_module.html#listen
> but found no information if I can use multiple listen directives for ssl without activating the interface.
> 
> Can I configure it like this? And are there any problems I will need to think of?
> 
> Server A: 192.168.178.20
> Server B: 192.168.178.30
> Server C: 192.168.178.40
> 
> 
> server {
>   listen                     192.168.178.20:443 ssl;
>   listen                     192.168.178.30:443 ssl;
>   listen                     192.168.178.40:443 ssl;
>   server_name                my.example.com;
> ...
> ...
> }
> 
> Regards, Axel
> 

Add wildcard:

  listen                     *:443 ssl;
  listen                     192.168.178.20:443 ssl;
  listen                     192.168.178.30:443 ssl;
  listen                     192.168.178.40:443 ssl;


-- 
Igor Sysoev
http://nginx.com



More information about the nginx mailing list