$ nginx -V # 查看是否有--with-http_v2_module如果没有,卸载后重装nginx:$ brew install --with-http2 nginx测试配置的语法是否正确:$ nginx -tnginx http/2 配置添加自签名根证书到系统中