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

做网站和推广工资多少钱赣州seo培训

做网站和推广工资多少钱,赣州seo培训,网站制作 常州,app网站建设阿里巴巴为了加快网站的解析速度,可以把动态页面和静态页面由不同的服务器来解析,加快解析速度。降低原来单个服务器的压力。 在动静分离的tomcat的时候比较明显,因为tomcat解析静态很慢,其实这些原理的话都很好理解,简单来说&…

为了加快网站的解析速度,可以把动态页面和静态页面由不同的服务器来解析,加快解析速度。降低原来单个服务器的压力。 在动静分离的tomcat的时候比较明显,因为tomcat解析静态很慢,其实这些原理的话都很好理解,简单来说,就是使用正则表达式匹配过滤,然后交个不同的服务器。

动静分离

实质 :使用正则表达式,匹配过滤,交给不同的服务器

优点 :把动态页面和静态页面分别由不同的服务器来解析,加快解析速度,降低单个服务器的压力

环境准备

静态资源配置(10.36.192.169)

yum安装nginx

访问nginx的网站,nginx.org  进去找到nginx的yum源
在命令行输入echo '
[nginx-stable]
name=nginx stable repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=1
enabled=1
gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true[nginx-mainline]
name=nginx mainline repo
baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/
gpgcheck=1
enabled=0
gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true ' > /etc/yum.repos.d/nginx.repo
清理缓存,生成自己缓存,列出yum仓库
yum clean all
yum makecache
yum repolist
yum install yum-utils
yum -y install nginx
修改配置文件
vim /etc/nginx/conf.d/default.conf
server {listen 80;server_name     localhost;location ~ \.(html|jpg|png|js|css|gif|bmp|jpeg) {root /usr/share/nginx/html;}
}
重启nginx
nginx -t   #检查配置的语法有无问题
nginx -s reload   #重载配置

动态资源配置(192.168.20.135)

yum安装php
rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
yum install php71w-xsl php71w php71w-ldap php71w-cli php71w-common php71w-devel php71w-gd php71w-pdo php71w-mysql php71w-mbstring php71w-bcmath php71w-mcrypt -y
yum install -y php71w-fpm
systemctl start php-fpm
systemctl enable php-fpm

yum 安装nginx方法如上

修改nginx配置文件
vim /etc/nginx/conf.d/default.conf
server {listen      80;server_name     localhost;location ~ \.php$ {root           /usr/local/nginx/html;  #指定网站目录fastcgi_pass   127.0.0.1:9000;    #指定访问地址fastcgi_index  index.php;		#指定默认文件fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name; #站点根目录,取决于root配置项include        fastcgi_params;  #包含nginx常量定义}}
重启nginx
nginx -t
nginx -s reload

nginx代理机配置(192.168.20.134)

修改nginx子自配置文件
vim /etc/nginx/conf.d/default.conf
upstream static  {server 10.36.192.169   weight=1  max_fails=2  fail_timeout=2s;
}
upstream php {server 192.168.20.135   weight=2  max_fails=2  fail_timeout=2s;              
}server {listen       80;server_name  localhost;location ~ \.php$ {proxy_pass http://php;proxy_set_header Host $host:$server_port;proxy_set_header X-Real-IP $remote_addr;proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;}
location ~ .*\.(html|gif|jpg|png|bmp|swf|css|js)$ {proxy_pass http://static;proxy_set_header Host $host:$server_port;proxy_set_header X-Real-IP $remote_addr;proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;}
}
重启nginx
nginx -t
nginx -s reload

客户端访问

   当访问静态页面的时候location 匹配到 (html|jpg|png|js|css|gif|bmp|jpeg) 通过转发到静态服务器,静态服务通过location的正则匹配来处理请求。
   当访问动态页面时location匹配到 .php 结尾的文件转发到后端php服务处理请求。

http://www.zhongyajixie.com/news/57067.html

相关文章:

  • 专业广州网站建设新闻热点最新事件
  • 福州网站建设网络营销课程个人感悟
  • 做视频网站软件在线seo优化
  • 做彩平的材质网站游戏推广员到底犯不犯法
  • 深圳龙岗今天最新疫情seo自动工具
  • 交互设计个人网站郑州网站推广技术
  • nodejs+php+wordpressseo管理系统培训
  • wordpress 主题乱了整站seo怎么做
  • 手机网站建设事项网络营销策略方案
  • 青岛房产网二手房最新信息seo优化在线
  • 惠州建设工程造价管理协会网站seo网站排名的软件
  • 完善旅游网站建设aso优化重要吗
  • 网站开发培训网站app搜索优化
  • 本地搭建php网站什么是网络营销公司
  • sketch可以做网站交互么seo网站排名助手
  • 网站建设公司创意百度官网首页官网
  • 网站高端网站建设如何免费注册一个网站
  • 网站架构设计师自助建站系统模板
  • 徐州seo关键词郑州seo外包顾问热狗
  • 如何管理手机网站首页沪深300指数基金
  • 做电影网站需要哪些条件网络营销成功案例有哪些2022
  • 网站开发有前景吗正规网站优化推广
  • 网站如何建设时时彩百度投诉中心人工电话号码
  • 上海做网站优化价格seo知识培训
  • 怎样是做网站营销网站推荐
  • 怎么做投票管理系统后台网站济南优化seo公司
  • wordpress禁止谷歌字体aso排名优化知识
  • 上行30m可以做网站吗培训课程开发
  • html网站的直播怎么做的郑州网络推广排名
  • 做网站在哪里找素材媒体发稿平台