HTTP/2 and HTTPS

Richard Stanway r1ch+nginx at teamliquid.net
Mon Mar 14 23:02:01 UTC 2016


You probably need to specify the IP on the listen directive if you want
different configurations of listening ports on different IPs.

On Mon, Mar 14, 2016 at 11:43 PM, Roswebnet <nginx-forum at forum.nginx.org>
wrote:

> Hi everyone,
>
> I have strange issue with nginx 1.9.12. I have 3 IP addresses as a server
> name that are alias IPs on a single Ubuntu server 15.10. Each servername
> related to specific protocol:
>
> http:
>
> server {
>     listen       80;
>     server_name  192.168.1.161;
>
>     #charset koi8-r;
>     #access_log  /var/log/nginx/log/host.access.log  main;
>
>     location / {
>         root   /usr/share/nginx/static;
>         index  index.html;
>     }
>
>     #error_page  404              /404.html;
>
>     # redirect server error pages to the static page /50x.html
>     #
>     error_page   500 502 503 504  /50x.html;
>     location = /50x.html {
>         root   /usr/share/nginx/html;
>     }
> }
>
> https:
>
> server {
>     listen       443 ssl;
>     server_name  192.168.1.162;
>
>     #charset koi8-r;
>     #access_log  /var/log/nginx/log/host.access.log  main;
>
>     root   /usr/share/nginx/static;
>     index  index.html index.htm;
>
>     ssl_certificate /etc/nginx/tls/certificate.crt;
>     ssl_certificate_key /etc/nginx/tls/privatekey.key;
>
>
>     ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
>     ssl_ciphers HIGH+kEECDH+AESGCM:HIGH+kEECDH:HIGH+kEDH:HIGH:!aNULL;
>
>     location / {
>        try_files $uri $uri/ =404;
>     }
>
>     #error_page  404              /404.html;
>
>     # redirect server error pages to the static page /50x.html
>     #
>     error_page   500 502 503 504  /50x.html;
>     location = /50x.html {
>         root   /usr/share/nginx/html;
>     }
> }
>
> http2:
>
> server {
>     listen       443 ssl http2;
>     server_name  192.168.1.163;
>
>     #charset koi8-r;
>     #access_log  /var/log/nginx/log/host.access.log  main;
>
>     ssl_certificate /etc/nginx/tls/certificate.crt;
>     ssl_certificate_key /etc/nginx/tls/privatekey.key;
>
>     location / {
>         root   /usr/share/nginx/static;
>         index  index.html index.htm;
>     }
>
>     #error_page  404              /404.html;
>
>     # redirect server error pages to the static page /50x.html
>     #
>     error_page   500 502 503 504  /50x.html;
>     location = /50x.html {
>         root   /usr/share/nginx/html;
>     }
> }
>
>
> As you see for those servers content is the same, and it is served well.
> However, if I use webconsole of Firefox I am getting that https site is a
> http2 site and http2 site is http2. The same situation is in Internet
> explorer.
>
> What I am doing wrong?
>
> Thank you.
>
> Posted at Nginx Forum:
> https://forum.nginx.org/read.php?2,265326,265326#msg-265326
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20160315/c6878993/attachment.html>


More information about the nginx mailing list