IPV4 & IPV6 Virtual Hosting - address in use

I have the sollowing problem:

If i config all sites in one file all works finde, but if i have for
each host a own config than i get the error

nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)

my config File for the hosts looks like:

server {
listen 80; ## listen for ipv4; this line is default and implied
listen [::]:80 default_server ipv6only=on; ## listen for ipv6

Make site accessible from http://localhost/

server_name _;

return 444;

location ~ /.ht {
deny all;
}
}

server {
listen 80;
listen [2001:1010:18:697b::1]:80;

}

server {
listen 80;
listen [2001:1010:18:697b::2]:80;

}

server {
listen 80;
listen [2001:1010:18:697b::3]:80;

}

All server use The same IPV4 and a own IPV6.

But as i have say abdove this works only if all in the same file and not
splited to each own… :frowning:

Posted at Nginx Forum: