



全文预览已结束
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
Linux软件安装一、 Pcre+nginx + nginx_upstream_jvm_route安装a.安装pcretar zxvf pcre-7.2.tar.gzcd pcre./configure prefix = /pcreMake;make installb,安装nginxtar zxvf nginx-0.6.32.tar.gzcd nginx-0.6.32#patch -p0 ./nginx-upstream-jvm-route-read-only/jvm_route.patch./configure prefix=/nginx with-pcre=/pcre with-http_rewrite_module -add-module=/root/nginx-upstream-jvm-route-read-only#make;#make install二、 修改nginx.conf文件修改成以下内容:#user nobody;worker_processes 5;#error_log logs/error.log;#error_log logs/error.log notice;#error_log logs/error.log info;#pid logs/nginx.pid;events use epoll; worker_connections 2048;http upstream backend server localhost:8087 invalid=web_tomcat2; #负载均衡服务器 server localhost:8088 invalid=web_tomcat1; #负载均衡服务器 jvm_route $cookie_JSESSIONID|sessionid reverse; include mime.types; default_type application/octet-stream; charset UTF-8; server_names_hash_bucket_size 128; client_header_buffer_size 32k; large_client_header_buffers 4 32k; client_max_body_size 20m; limit_rate 1024k; sendfile on; tcp_nopush on; keepalive_timeout 60; tcp_nodelay on; fastcgi_connect_timeout 300; fastcgi_send_timeout 300; fastcgi_read_timeout 300; fastcgi_buffer_size 64k; fastcgi_buffers 4 64k; fastcgi_busy_buffers_size 128k; fastcgi_temp_file_write_size 128k; gzip on; gzip_min_length 1k; gzip_buffers 4 16k; gzip_http_version 1.0; gzip_comp_level 2; gzip_types text/plain application/x-javascript text/css application/xml; gzip_vary on; #limit_zone crawler $binary_remote_addr 10m; server listen 80; server_name localhost; index index.jsp index.htm index.html; root /usr/local/program/xhxw_web; #access_log logs/host.access.log main; location / proxy_pass http:/backend; #设为反向代理 proxy_redirect off; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $http_host; location .*.(htm|html|ico|gif|jpg|jpeg|png|bmp|swf)$ expires 30d; location .*.(js|css)?$ expires 1h; location /Nginxstatus stub_status on; access_log off; log_format access $remote_addr - $remote_user $time_local $request $status $body_bytes_sent $http_referer $http_user_agent $http_x_forwarded_for; #access_log off; server listen 80; server_name ; index index.jsp index.htm index.html; root /usr/local/program/xhxw; #access_log logs/host.access.log main; location / proxy_pass http:/localhost:8058; proxy_redirect off; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $http_host; 测试 配置文件是否有错 /usr/local/nginx/sbin/nginx t如果出现:the configuration file /usr/local/nginx/conf/nginx.conf syntax is okconfiguration file /usr/local/nginx/conf/nginx.conf test is successful说明配置成
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 方城一中考试卷子及答案
- 2025乐清社工考试真题及答案
- 2025考试文言文真题及答案
- 湖北恩施中考试题及答案
- 2025今天司法考试真题及答案
- 2025教师d类考试真题及答案
- 考点攻克苏科版八年级物理下册《力与运动》重点解析练习题(含答案详解)
- 新版煤矿班组长考试题库及答案
- 中职高一思想政治考试试题及答案
- 国家开放大学电大《学前教育学》期末试题及答案
- 非煤矿山建设项目管理办法
- 相似三角形的判定与性质复习课(原创修订)课件
- 姓氏源流与文化寻根(精品·创新·实用)课件
- 南医大之十四经脉与常用腧穴课件
- 自动化生产线 课件
- 氧化锆氧量计测氧原理课件
- 教科版四年级(上)科学1.1听听声音课课练习题(含答案)
- 原子物理学:第2章 第5节 索末菲理论
- 金刚经讲义江味农居士遗著
- 二甲医院麻醉科相关工作制度汇编
- SOT600 -SY2000交换机操作指导
评论
0/150
提交评论