Last active
January 12, 2017 03:42
-
-
Save yangl/df050c346f187b95625b to your computer and use it in GitHub Desktop.
nginx-sticky-module使用说明
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1.cd $NGINX_HOME,执行./sbin/nginx -V 查看安装参数; | |
2.得到安装参数后,添加nginx-sticky-module模块重新编译nginx, | |
./configure "之前的参数" --add-module=/nginx-sticky-module下载所在目录/nginx-sticky-module | |
make && make install | |
3.在upsteam中添加如下: | |
sticky name=srv_id expires=1h domain=uxin.com path=/; | |
4.nginx reload测试查看是否有效果 | |
参见: | |
https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng/overview | |
http://nginx.org/en/docs/http/ngx_http_upstream_module.html#sticky |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment