Multiple https website with IPv6

Francis Daly francis at daoine.org
Tue Jan 2 11:01:59 UTC 2018


On Tue, Jan 02, 2018 at 01:40:20AM -0500, Kurogane wrote:

Hi there,

> I am using nginx with multiples https with a single IPv4 and dedicated IPv6
> for each domain.

Looking at your (edited) config...

> server {
>     listen 443 ssl http2;
>     server_name domain.com;
>     return 301 https://www.$server_name$request_uri;
> }
> 
> server {
>         listen 443 default_server ssl http2;
>         server_name www.domain.com;
> }

> server {
>     listen 443 ssl http2;
>     server_name domain2.com;
>     return 301 https://www.$server_name$request_uri;
> }
> 
> server {
>         listen 443 ssl http2;
>         server_name www.domain2.com;
> }

It looks to me like your question is "how do I run multiple https web
sites on a single IP address?".

If that is the case, then the modern answer is "use SNI".

http://nginx.org/en/docs/http/configuring_https_servers.html

> What's wrong with my config? If work on IPv6 why not in IPv4 is in same
> config block?

You have a dedicated IPv6 address. You have a shared IPv4 address.

It is not "IPv6 works, IPv4 fails"; it is "dedicated works, shared fails".

	f
-- 
Francis Daly        francis at daoine.org


More information about the nginx mailing list