[nginx] [emerg] the 'http2' parameter requires ngx_http_v2_module

 

系統:Linux

升級http2.0

  • 修改Nginx配置:  listen 443 ssl http2 default_server; 
  • nginx -t  // 報錯
  • nginx -s reload  // error.log中報錯
[emerg] the 'http2' parameter requires ngx_http_v2_module in xxx.conf
the 'http2' parameter requires ngx_http_v2_module in xxx.conf:6
 
原因是升級http2.0需要http2模塊
 

解決辦法:
  • 重新編譯和安裝
    • 下載最新Nginx源碼
    • ./configure --prefix=...... --with-http_v2_module  // 指明需要http2模塊
    • make
    • make install 
  • 重啓nginx
    • nginx -s stop;
    • nginx
 
 
 
 
 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章