当前位置: 首页 > news >正文

甘肃交通工程建设监理公司网站手机wap网页设计

甘肃交通工程建设监理公司网站,手机wap网页设计,公司名称大全四个字,网站建设用途前面几篇记录下nginx的基本运功#xff0c;代理服务器的访问#xff0c;这里来试验下nginx的反向代理。 反向代理#xff08;Reverse Proxy#xff09;方式是指以代理服务器来接受internet上的连接请求#xff0c;然后将请求转发给内部网络上的服务器#xff0c;并将从服…前面几篇记录下nginx的基本运功代理服务器的访问这里来试验下nginx的反向代理。 反向代理Reverse Proxy方式是指以代理服务器来接受internet上的连接请求然后将请求转发给内部网络上的服务器并将从服务器上得到的结果返回给internet上请求连接的客户端此时代理服务器对外就表现为一个反向代理服务器。 在我们的java项目中的体现就是通过80端口访问Nginx接收到然后进行转发给tomcat服务器再将服务器的结果给返回。 这里需要修改nginx.conf文件。 upstream backend {#代理的IP weight权重大的接收的访问量就大反之server localhost:8084 weight50;server localhost:8088 weight50;}将接收的请求进行转发 # / 所有做负载均衡 反向代理location / {root /data/wwwroot1;index index.html index.htm;#索引文件proxy_pass http://backend;}这样通过请求nginx的请求就可以被分配转发到tomcat上去。这里我是定义了两台tomcat服务器同时用来做负载均衡的处理。通过设置weight可以控制访问量。 具体配置代码如下 #user nobody; # worker 工作进程 一般设置 CPU数 * 核数 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;#1个worker产生多少个连接数 }# 配置HTTP服务器的主要段 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 65;#gzip压缩功能设置gzip on;gzip_min_length 1k;gzip_buffers 4 16k;gzip_http_version 1.0;gzip_comp_level 6;gzip_types text/plain text/css text/javascript application/json application/javascript application/x-javascript application/xml;gzip_vary on;#设定负载均衡后台服务器列表upstream backend {#代理的IP weight权重大的接收的访问量就大反之server localhost:8084 weight50;server localhost:8088 weight50;}server {listen 2022;server_name localhost;charset utf-8;access_log logs/wwwroot2.access.log main;location / {root /data/wwwroot2;index index.html index.htm;#索引文件}}# 虚拟主机段server {listen 80;server_name localhost;root /data/wwwroot1;charset utf-8;#访问日志 access_log logs/wwwroot1.access.log main;# / 所有做负载均衡 反向代理location / {root /data/wwwroot1;index index.html index.htm;#索引文件proxy_pass http://backend;}error_page 404 /404.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 Apaches document root# concurs with nginxs 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;# }#}}测试结果发现通过访问80端口的地址展现的结果是基本五五开的。 还会随机访问到    以上两个截图分别对应了我的两个tomcat服务器下的测试文件。   转载于:https://www.cnblogs.com/sunxun/p/9965181.html
http://www.pierceye.com/news/495601/

相关文章:

  • 小米4路由器可以做网站嘛服务类网站建设服务公司
  • 电子商务网站建设规划书实例注册微信公众平台
  • 网站设计课程总结线上营销方案
  • 谷城网站建设网站集群建设实施方案
  • 怎么做外贸生意谷歌seo服务
  • 做网站好还是做淘宝好市场调研模板
  • 网站做换肤做一个平台费用是多少
  • 省内注销二建 建设部网站更新慢网站建设合同书封皮
  • 天津城市建设网站营销型网站的好处
  • 网站建设维护文档好看的页面
  • 网站搜索优化官网网站建设在电子商务中的作用的看法
  • 网站推广费用价格html大屏展示模板
  • 编辑网站用什么软件网站开发人员职责
  • 网站搜索引擎提交wordpress发布站点
  • 阳春网站建设天水网站seo
  • 仙桃市建设局网站wordpress链接前面的图标
  • 温州市城乡建设建档案馆网站公司装修费用可以一次性入账吗
  • 房地产开发公司网站宠物网页设计模板
  • 网站备案信息可以改吗中国做二手房最大的网站
  • 设计 企业网站罗湖网站-建设深圳信科
  • 太原自助模板建站手机版电脑qq登录入口
  • 公司网站建设哪家比较好app 网站
  • 建设银行个人网站打不开个人主页模板下载
  • 山西建设公司网站wordpress视频适应手机端
  • 原型样网站做一般的公司门户网站投资额
  • 南宁百度网站公司电话网站配置优化
  • 德州网站建设的公司免费注册公司怎么注册
  • 成都开发网站建设中国建设规划采购网站
  • 企业网站建设应避免数据孤岛深圳东莞网站建设
  • pk10网站怎么做郑州seo费用