Quantcast
Channel: Nginx Forum - Nginx Mailing List - English
Viewing all articles
Browse latest Browse all 7229

HTTP/2 and HTTPS (2 replies)

$
0
0
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.

Viewing all articles
Browse latest Browse all 7229

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>