<div dir="ltr">You probably need to specify the IP on the listen directive if you want different configurations of listening ports on different IPs.</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 14, 2016 at 11:43 PM, Roswebnet <span dir="ltr"><<a href="mailto:nginx-forum@forum.nginx.org" target="_blank">nginx-forum@forum.nginx.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi everyone,<br>
<br>
I have strange issue with nginx 1.9.12. I have 3 IP addresses as a server<br>
name that are alias IPs on a single Ubuntu server 15.10. Each servername<br>
related to specific protocol:<br>
<br>
http:<br>
<br>
server {<br>
    listen       80;<br>
    server_name  192.168.1.161;<br>
<br>
    #charset koi8-r;<br>
    #access_log  /var/log/nginx/log/host.access.log  main;<br>
<br>
    location / {<br>
        root   /usr/share/nginx/static;<br>
        index  index.html;<br>
    }<br>
<br>
    #error_page  404              /404.html;<br>
<br>
    # redirect server error pages to the static page /50x.html<br>
    #<br>
    error_page   500 502 503 504  /50x.html;<br>
    location = /50x.html {<br>
        root   /usr/share/nginx/html;<br>
    }<br>
}<br>
<br>
https:<br>
<br>
server {<br>
    listen       443 ssl;<br>
    server_name  192.168.1.162;<br>
<br>
    #charset koi8-r;<br>
    #access_log  /var/log/nginx/log/host.access.log  main;<br>
<br>
    root   /usr/share/nginx/static;<br>
    index  index.html index.htm;<br>
<br>
    ssl_certificate /etc/nginx/tls/certificate.crt;<br>
    ssl_certificate_key /etc/nginx/tls/privatekey.key;<br>
<br>
<br>
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;<br>
    ssl_ciphers HIGH+kEECDH+AESGCM:HIGH+kEECDH:HIGH+kEDH:HIGH:!aNULL;<br>
<br>
    location / {<br>
       try_files $uri $uri/ =404;<br>
    }<br>
<br>
    #error_page  404              /404.html;<br>
<br>
    # redirect server error pages to the static page /50x.html<br>
    #<br>
    error_page   500 502 503 504  /50x.html;<br>
    location = /50x.html {<br>
        root   /usr/share/nginx/html;<br>
    }<br>
}<br>
<br>
http2:<br>
<br>
server {<br>
    listen       443 ssl http2;<br>
    server_name  192.168.1.163;<br>
<br>
    #charset koi8-r;<br>
    #access_log  /var/log/nginx/log/host.access.log  main;<br>
<br>
    ssl_certificate /etc/nginx/tls/certificate.crt;<br>
    ssl_certificate_key /etc/nginx/tls/privatekey.key;<br>
<br>
    location / {<br>
        root   /usr/share/nginx/static;<br>
        index  index.html index.htm;<br>
    }<br>
<br>
    #error_page  404              /404.html;<br>
<br>
    # redirect server error pages to the static page /50x.html<br>
    #<br>
    error_page   500 502 503 504  /50x.html;<br>
    location = /50x.html {<br>
        root   /usr/share/nginx/html;<br>
    }<br>
}<br>
<br>
<br>
As you see for those servers content is the same, and it is served well.<br>
However, if I use webconsole of Firefox I am getting that https site is a<br>
http2 site and http2 site is http2. The same situation is in Internet<br>
explorer.<br>
<br>
What I am doing wrong?<br>
<br>
Thank you.<br>
<br>
Posted at Nginx Forum: <a href="https://forum.nginx.org/read.php?2,265326,265326#msg-265326" rel="noreferrer" target="_blank">https://forum.nginx.org/read.php?2,265326,265326#msg-265326</a><br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
</blockquote></div><br></div>