configuration nginx server block [virtual host] with Ipv6.

Vanhels nginx-forum at forum.nginx.org
Thu Mar 9 23:06:05 UTC 2017


Thanks for your answer, I'll specify it better:

Config Work Fine:

    [domain1.conf]:

       server {
            listen [::]:80;
            root /home/domain1/public_html;
            index index.php index.html index.htm;
            server_name domain1 www.domain1;
            location ~ \.php$ {
                fastcgi_pass [::]:9056;
            }
        }

        [subdomain.domain1.conf]:

        server {
            listen 80;
            root /home/domain1/public_html/subdomain;
            index index.php index.html index.htm;
            server_name subdomain.domain1 www.subdomain.domain1;
            location ~ \.php$ {
                fastcgi_pass 127.0.0.1:9056;
            }
        } 

Config No Work :


    [domain1.conf]:

       server {
            listen [::]:80;
            root /home/domain1/public_html;
            index index.php index.html index.htm;
            server_name domain1 www.domain1;
            location ~ \.php$ {
                fastcgi_pass [::]:9056;
            }
        }

        [subdomain.domain1.conf]:

        server {
            listen [::]:80;
            root /home/domain1/public_html/subdomain;
            index index.php index.html index.htm;
            server_name subdomain.domain1 www.subdomain.domain1;
            location ~ \.php$ {
                fastcgi_pass [::]:9056;
            }
        } 

The error happens when Listen and fastcgi_pass have the same port address in
both domains,


Thks,

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,272864,272867#msg-272867



More information about the nginx mailing list