Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question

1 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.