主题 : 有工作人员能透明一下jeecms 的tomcat和nginx的配置么 |
级别: 白丁
|
1# 发表于:2010-07-29 09:30:10 IP:113.120.*.*
|
||||
---|---|---|---|---|---|
级别: 白丁
|
2# 发表于:2010-07-29 09:51:52 IP:59.134.*.*
jeecms对tomcat和nginx的配置没有特殊要求,只需要把相应的动态请求转发给tomcat处理即可
|
||
---|---|---|---|
级别: 童生
|
6# 发表于:2011-07-26 13:15:00 IP:61.97.*.*
nginx + tomcat(2个) + jeecms 我已配置总是告诉我会话超时
|
||
---|---|---|---|
级别: 童生
|
7# 发表于:2011-07-26 14:25:45 IP:61.97.*.*
nginx + tomcat(2个) 分发,登录时候总是告诉我session超时,哪位高人指点一下:
#运行用户 #user nobody; #启动进程 worker_processes 1; #全局错误日志及PID文档 #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; #工作模式及连接数上限 worker_rlimit_nofile 65535; events { #use epoll; worker_connections 1024; } #设定http服务器,利用他的反向代理功能提供负载均衡支持 http { #文件扩展名与文件类型映射表 include mime.types; #默认文件类型 default_type application/octet-stream; #include /usr/local/nginx/conf/proxy.conf; #设定日志格式 #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' # '$status $body_bytes_sent "$http_referer" ' # '"$http_user_agent" "$http_x_forwarded_for"'; #日志文件/dev/null; #设定access log #access_log logs/access.log main; #编码 #charset utf-8; source_charset utf-8; send_timeout 3m; #参数都有所调整.目的是解决代理过程中出现的一些502 499错误 sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65;#参数加大,以解决做代理时502错误 server_tokens off; #隐藏版本号 #tomcat设定负载均衡的服务器列表 upstream tomcat_server { server localhost:8085 weight=1 max_fails=2 fail_timeout=30s; server localhost:8888 weight=1 max_fails=2 fail_timeout=30s; } #设定虚拟主机 # 定义静态资源访问的服务,对应的域名:res.abc.com server { listen 80; server_name localhost;# res.abc.com #charset koi8-r; #编码 charset utf-8; # 默认其他静态资源 location / { root d:\apache-tomcat-6.0.29\webapps;#设定网站的资源存放路径 index index.html index.jsp default.jsp index.do default.do;#设定访问的默认首页地址 access_log off; expires 8h;#设置浏览器过期时间 } #设定本虚拟主机的访问日志 #access_log logs/www.yejr.com.access.log main; #access_log logs/host.access.log main; #所有jsp|jspx|do的页面均交由tomcat处理 location ~ .*\.(jsp|jspx|do)$ { #root d:\apache-tomcat-6.0.29\webapps\p2pcms\www; #index index.html index.html; proxy_pass http://tomcat_server;#转向tomcat处理 proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root d:\apache-tomcat-6.0.29\webapps\p2pcms\www; } # 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; # server_name localhost; # ssl on; # ssl_certificate cert.pem; # ssl_certificate_key cert.key; # ssl_session_timeout 5m; # ssl_protocols SSLv2 SSLv3 TLSv1; # ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP; # ssl_prefer_server_ciphers on; # location / { # root html; # index index.html index.htm; # } #} } |
||
---|---|---|---|
1
共1页