Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Let our site support http2 | nginx supports http2

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

Previously wrote how to install nginx in Ubuntu: blog.51cto.com/11140372/2335820

Here's how to change the site to http2 (http2 benefits are self-evident, self-Baidu):

wget https://github.com/openssl/openssl/archive/OpenSSL_1_1_1a.tar.gztar zxvf OpenSSL_1_1_1a.tar.gzcd nginx-1.15.8/#http2--with-openssl specified openssl directory via--with-http_v2_module package./ configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_realip_module --with-http_v2_module --with-openssl=../ openssl-OpenSSL_1_1_1amake -j2sudo make install #Finally configure listen 443 ssl http2;server_name localhost;ssl_certificate_key /home/anfang/Downloads/cert/key.pem;ssl_certificate under nginx conf server /home/anfang/Downloads/cert/cert.pem;

This is my nginx configuration file for laravel, now changed to http2:

See me before laravel configuration process: blog.51cto.com/11140372/2335680

Restart nginx here and visit https://yourip. My Chrome version supports http2.

How to determine if a website uses HTTP/2: blog.csdn.net/Edu_enth/article/details/85318840

Among them, key.pem and cert.pem can be generated by openssl. Or download mine: http://down.51cto.com/data/2457495

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report