当前位置:   article > 正文

nginx 编译和安装ssl模块_nginx安装编译ssl

nginx安装编译ssl
  1. mkdir /usr/local/nginx
  2. cd /usr/local/nginx
  3. wget http://nginx.org/download/nginx-1.20.2.tar.gz
  4. tar -zxvf nginx-1.20.2.tar.gz
  5. cd nginx-1.20.2

  1. yum update
  2. yum install openssl openssl-devel
  3. yum -y install pcre-devel
  4. ./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module
  1. make
  2. make install

环境变量

  1. vi /etc/profile
  2. PATH=$PATH:/usr/local/nginx/sbin
  3. export PATH
  4. source /etc/profile

nginx 编译和安装ssl模块

开启webSocket支持

在http下配置

  1. map $http_upgrade $connection_upgrade {
  2. default upgrade;
  3. '' close;
  4. }

在localhost下配置

  1. proxy_set_header Upgrade $http_upgrade;
  2. proxy_set_header Connection "upgrade";

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/繁依Fanyi0/article/detail/639996
推荐阅读
相关标签
  

闽ICP备14008679号