1. tomcat6.0 配置

memcached-session-manager 实现session共享

1.1 下载memcached-session-manager-1.6.5.jar、memcached-session-manager-tc6-1.6.5.jar(tomcat6.0)、msm-javolution-serializer-1.6.5.jar、spymemcached-2.8.12.jar、javolution-5.4.3.1.jar和couchbase-client-1.1.4.jar  共5个jar包放入tomcat的lib目录下;

1.2 context节点下增加如下配置

 <Manager className="de.javakaffee.web.msm.MemcachedBackupSessionManager"
memcachedNodes="n1:192.168.1.104:11211"
sticky="false"
requestUriIgnorePattern=".*\.(png|gif|jpg|css|js)$"
sessionBackupAsync="false"
sessionBackupTimeout="100"
transcoderFactoryClass="de.javakaffee.web.msm.serializer.javolution.JavolutionTranscoderFactory"
copyCollectionsForSerialization="false"
/>

2.nginx-1.5.6 配置

#user  nobody;
worker_processes 1; #error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info; #pid logs/nginx.pid; events {
worker_connections 1024;
} http {
include mime.types;
default_type application/octet-stream; #log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"'; #access_log logs/access.log main; sendfile on;
#tcp_nopush on; #keepalive_timeout 0;
keepalive_timeout 10; #gzip on;
upstream localhost {
server 192.168.1.104:85;
server 192.168.1.106:85;
} server {
listen 80;
server_name localhost; #charset koi8-r;
charset utf-8; #access_log logs/host.access.log main; location / {
root html;
index index.html index.htm;
proxy_pass http://localhost;
proxy_set_header X-Real-IP $remote_addr;
client_max_body_size 100m;
} location ~ ^/(WEB-INF)/ {
deny all;
} #error_page 404 /404.html;\
error_page 500 502 503 504 /50x.html; # redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
} # proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#} # deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
} # another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias; # location / {
# root html;
# index index.html index.htm;
# }
#} # HTTPS server
#
#server {
# listen 443 ssl;
# server_name localhost; # ssl_certificate cert.pem;
# ssl_certificate_key cert.key; # ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 5m; # ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on; # location / {
# root html;
# index index.html index.htm;
# }
#} }

最新文章

  1. [题解]poj 1274 The Perfect Stall(网络流)
  2. JavaScript Patterns 5.5 Sandbox Pattern
  3. 快速、直接的XSS漏洞检测爬虫 – XSScrapy
  4. MetInfo安装
  5. IOS知识小记
  6. Javascript新手集中营
  7. Springboot 学习笔记 ①
  8. Jfinal启动原理及源码简析
  9. ASP.NET 使用Session,避免用户F5刷新时重复提交(转)
  10. 拼接SQL执行语句时,对单引号的处理
  11. burnside+polya 整理
  12. Linux 程序后台运行
  13. SQL Server-- 存储过程中错误处理
  14. leetcode944
  15. 第 6 章 C控制语句:循环
  16. amcharts属性
  17. ASP.NET Web Api OwinSelfHost Restful 使用
  18. Linux时间子系统(四) timekeeping
  19. 【Loadrunner】性能测试:通过服务器日志获取性能需求
  20. CentOS-7设置开机进入命令行界面(不进入图形界面)

热门文章

  1. Apache+Tomcat +mod_proxy集群负载均衡及session
  2. html-----007
  3. jQuery 源码分析3: jQuery.fn/ jQuery.prototype
  4. CCPC网络赛,HDU_5842 Lweb and String
  5. ZeroMemory和memset的区别
  6. 动态SQL实现批量删除指定数据库的全部进程
  7. ABP手机端调用API时的CORS
  8. main(int argc , char *argv[])
  9. docker的基本使用
  10. @font-face