首页 > 系统相关 >nginx首次安装sticky模块-cookie保持会话

nginx首次安装sticky模块-cookie保持会话

时间:2023-10-20 18:11:44浏览次数:33  
标签:http temp -- module sticky nginx cookie path

首次安装nginx:(下一篇文章是nginx添加sticky模块)

yum install -y pcre* openssl* gcc gcc-c++ make --安装编译环境
wget https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng/get/08a395c66e42.zip --下载sticky模块
nginx -v --查看Nginx版本,因为要下载和yum安装nginx对应版本的源码包
wget http://nginx.org/download/nginx-1.18.0.tar.gz
yum install -y unzip --安装解压工具
unzip 08a395c66e42.zip --解压模块包
mv nginx-goodies-nginx-sticky-module-ng-08a395c66e42/ nginx-sticky-module-ng/ --改名
tar xzvf nginx-1.18.0.tar.gz -C /usr/local/ --解压nginx的源码包
cd /usr/local/nginx-1.18.0/
nginx -V --查看yum安装nginx所有模块
======================================================================================
./configure --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-compat --with-file-aio --with-threads --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-mail --with-mail_ssl_module --with-stream --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fPIC' --with-ld-opt='-Wl,-z,relro -Wl,-z,now -pie' --add-module=/root/nginx-sticky-module-ng
======================================================================================
make && make install
Nginx -V --再次查看Nginx模块,添加成功

标签:http,temp,--,module,sticky,nginx,cookie,path
From: https://www.cnblogs.com/guoqian/p/17777716.html

相关文章

  • nginx添加sticky模块-cookie保持会话
    环境nginx1.8.0 centos6.X sticky:1.2.5 wgethttps://bitbucket.org/nginx-goodies/nginx-sticky-module-ng/get/master.tar.gzcookie负载均衡相比iphash来比其中一个特点比较明显:内网nat用户的均衡。而iphash无法做到。yuminstallopenssl openssl-devel先停止ngi......
  • ansible使用【2】--安装Nginx并熟悉playbook
    前提:主控机器已经安装好ansible,被控制的是53.225安装教程看:https://www.cnblogs.com/liqi175/p/17776530.html参考资料:https://ansible.leops.cn/basic/Quickstart/安装Nginx:ansible192.168.53.225-mapt-a'name=nginx' 说明:-m指定模块,我这里指定apt安装模块......
  • 谈谈selenium中的cookie操作
    实例演示以登录网易云音乐为例分两步走获取cookiesfromseleniumimportwebdriverfrompprintimportpprintdriver=webdriver.Chrome()driver.maximize_window()driver.get('https://music.163.com/')driver.delete_all_cookies()#此处只是演示api,可以不写的inpu......
  • kkfile4.0 nginx映射踩坑
    官网文档要修改base.url和service.context-path,但是修改后不起作用! 后花了大半天翻阅文档后才发现4.0并没有service.context-path,要修改server.servlet.context-path!!!!!(base.url同样要修改)  修改后  原帖:https://juejin.cn/post/7032191684440293390......
  • ES 结合nginx 实现自定义词库
    dockerrun-p80:80--namenginx-dnginx:1.10将容器内的配置文件拷贝到当前目录:dockercontainercpnginx:/etc/nginx.修改文件名称:mvnginxconf把这个conf移动到/mydata/nginx下执行命令删除原容器:dockerrmnginx创建新的nginx;执行以下命令dockerrun-......
  • java项目实践-cookie-session-day18
    目录1.cookie2.session3.servletcontext4.servletConfig1.cookiecookie在客户端(浏览器)中保持http状态的信息技术本质是浏览器缓存每次发请求的时候在请求头中带给服务端常见的应用场景:实现7天免登录浏览器F12request.setCharacterEncoding("utf-8");......
  • nginx生成自签名证书
    创建服务器证书秘钥文件[root@Nginx~]#opensslgenrsa-des3-outserver.key1024...Enterpassphraseforserver.key: #输入密码Verifying-Enterpassphraseforserver.key: #确认密码创建服务器证书申请文件[root@Nginx~]#opensslreq-new-key......
  • 一键部署反向代理神器 nginx proxy manager
    环境准备:安装完毕docker-compose[root@masternginx]#catdocker-compose.ymlversion:'3'services:app:image:'jc21/nginx-proxy-manager:latest'restart:unless-stoppedports:#这里意思是将容器内的8081443映射为主机的331332333-......
  • Nginx 服务器 SSL 证书安装部署
    工具:WinSCP、putty下载证书cloud.tencent.com_bundle.crt证书文件cloud.tencent.com_bundle.pem证书文件cloud.tencent.com.key私钥文件cloud.tencent.com.csrCSR文件上传证书到服务器通过WinSCP将已获取到的cloud.tencent.com_bundle.crt或cloud.tencent.com_......
  • linux centos7用 yum安装nginx
    1.nginx中加入nginx软件包yuminstallepel-releaseyumupdate2.安装nginxyum-yinstallnginx 3.查看nginx相关目录(可跳过)whereisnginx4.启动nginxsystemctlstartnginx5.nginx停止重启平滑重启命令systemctlstopnginxsystemctlrestartngi......