0

I've got a dedicated Centos 6.5 server with nginx and 2 ip-addresses (these are 2 ip(v4)-failover addresses from OVH) for hosting 2 different websites on the same server. I want to add ipv6 addresses but am not sure how to implement this.

I've got ifcfg-eth0 and ifcfg-eth0:1 both with a different ipv4 address.

The nginx configuration file looks like

server {
        listen ipv4address_site1:80;
        listen ipv4address_site1:443 default ssl spdy;
        server_name server_for_eth0;
}

server {
        listen ipv4address_site2:80;
        listen ipv4address_site2:443 default ssl spdy;
        server_name server_for_eth0:1;
}

How should I choose my ipv6 address (what should my ifconfig look like) and what should my nginx config look like?

Cheers, Adnan

1 Answer 1

2

The nginx configuration can be as simple as:

server {
    listen ipv4address_site1:80;
    listen ipv4address_site1:443 default ssl spdy;
    listen [ipv6address_site1]:80;
    listen [ipv6address_site1]:443 default ssl spdy;
    server_name server_for_eth0;
}

server {
    listen ipv4address_site2:80;
    listen ipv4address_site2:443 default ssl spdy;
    listen [ipv6address_site2]:80;
    listen [ipv6address_site2]:443 default ssl spdy;
    server_name server_for_eth0:1;
}

The IPv6 addresses you can use depend on what your hosting provider is giving you. The operating system configuration depends on what you are running. Maybe your hosting provider can help you with that.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .