赞
踩
- mkdir /usr/local/nginx
-
- cd /usr/local/nginx
-
-
- wget http://nginx.org/download/nginx-1.20.2.tar.gz
-
-
- tar -zxvf nginx-1.20.2.tar.gz
-
- cd nginx-1.20.2
- yum update
-
- yum install openssl openssl-devel
-
- yum -y install pcre-devel
-
- ./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module
- make
- make install
- vi /etc/profile
-
-
- PATH=$PATH:/usr/local/nginx/sbin
- export PATH
-
-
-
- source /etc/profile
nginx 编译和安装ssl模块
开启webSocket支持
在http下配置
- map $http_upgrade $connection_upgrade {
- default upgrade;
- '' close;
- }
在localhost下配置
- proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection "upgrade";
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。