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

做本地分类信息网站赚钱吗营销型网站建设模板

做本地分类信息网站赚钱吗,营销型网站建设模板,网站建设话语,洛阳网站建设价格低场景: nginx 配置负载均衡,甲方只提供一个端口,一个域名地址 方法: 一个端口一个域名匹配多个应用 方法一: 依靠设备浏览器区分: 使用UserAgent头来识别用户的客户端, CDN监测vary头的信息,如果内容不一致…

场景:
nginx 配置负载均衡,甲方只提供一个端口,一个域名地址
方法:
一个端口一个域名匹配多个应用

方法一:
依靠设备浏览器区分:
使用UserAgent头来识别用户的客户端,
CDN监测vary头的信息,如果内容不一致就缓存不同的内容,如果头信息一致才会缓存覆盖

vary头需要在源站添加,即在nginx中配置代理时进行添加,配置语句如下:

add_header Vary "Accept-Encoding, User-Agent";

根据头信息区分跳转
已经携带了请求头,对头信息的终端类型进行判断即可,如果符合终端类型则跳转到手机页面,不符合则跳转到PC页面

if ($http_user_agent ~* (mobile|nokia|iphone|ipad|android|samsung|htc|blackberry|iPhone|Android))  {root /xxxxxx;
}

详情讲解-链接
如下,案例:

    #PC端upstream merchantsweb{server 172.17.x.11:8096 weight=20;server 172.17.x.22:8096 weight=1;}#移动端upstream merchantswebapp{server 172.17.x.11:8094 weight=20;server 172.17.x.22:8094 weight=1;}    server {listen       8078;server_name  172.17.0.100;#方法一location / {root   html;index  index.html index.htm Default.aspx; add_header Vary "Accept-Encoding, User-Agent";#判断是否为手机端if ($http_user_agent ~* (mobile|nokia|iphone|ipad|android|samsung|htc|blackberry|iPhone|Android))  {proxy_pass http://merchantswebapp;}proxy_pass http://merchantsweb;}error_page   500 502 503 504  /50x.html;location = /50x.html {root   html;}}

方法二:
使用正则区分

    #PC端upstream merchantsweb{server 172.17.x.11:8096 weight=20;server 172.17.x.22:8096 weight=1;}#移动端upstream merchantswebapp{server 172.17.x.11:8094 weight=20;server 172.17.x.22:8094 weight=1;}    server {listen       8078;server_name  172.17.0.100;#方法二#判断路径  所有# pc端 http://172.17.0.100:8078# 移动端 http://172.17.0.100:8078/mobileApp/index.htmllocation / {root   html;index  index.html index.htm Default.aspx; proxy_pass http://merchantsweb;}#移动端 页面地址带有/mobileApp--http://172.17.0.100:8078/mobileApp/index.htmllocation /mobileApp {root   html;index  index.html index.htm Default.aspx; proxy_pass http://merchantswebapp;}# pc端 资源文件路径带有/merchants.ams.web--http://172.17.0.100:8078/merchants.ams.web/static/xxxx.js# ^~ 优先级高于~ .*location ^~ /merchants.ams.web {expires 12h;proxy_pass http://merchantsweb;}#所有# 设置js css和图片代理路径,否则前端访问找不到#移动端http://172.17.0.100:8078/static/xxxx.jslocation ~ .*\.(js|css)?$ {expires 12h;#移动端(根据需求来--标识)proxy_pass http://merchantswebapp; }location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)?$ {expires 12h;#移动端(根据需求来--标识)proxy_pass http://merchantswebapp;}error_page   500 502 503 504  /50x.html;location = /50x.html {root   html;}}

正则区分-案例

Nginx配置——区分PC或手机访问不同域名以及http跳转https

重要

1、项目地址匹配了(资源文件需要查看,能否匹配)
方法:
对应不同的应用–(nginx:一个端口对应不同应用判断
location ^~ /images/ {}
location ~* .(gif|jpg|jpeg)$ {}

  • 匹配所有以 gif、jpg或jpeg 结尾的请求
    然而,所有请求 /images/ (资源文件路径,项目打包后index.html文件内查看 关联路径,可修改React:修改package.json 文件内的homepage:可更改路径))下的图片会被 location ^~ /images/ 处理,因为 ^~ 的优先级更高,所以到达不了这一条正则

文章转载自:
http://wanjiatruepenny.xnLj.cn
http://wanjiaunderwear.xnLj.cn
http://wanjiapolemoniaceous.xnLj.cn
http://wanjiaoctavian.xnLj.cn
http://wanjiapedes.xnLj.cn
http://wanjiafribble.xnLj.cn
http://wanjiadiallage.xnLj.cn
http://wanjiabelibel.xnLj.cn
http://wanjiacosmically.xnLj.cn
http://wanjiabowshot.xnLj.cn
http://wanjiasprinter.xnLj.cn
http://wanjiaexpiator.xnLj.cn
http://wanjiaquaky.xnLj.cn
http://wanjiaindign.xnLj.cn
http://wanjiaweirdness.xnLj.cn
http://wanjiaunpresumptuous.xnLj.cn
http://wanjiamcluhanize.xnLj.cn
http://wanjiashankbone.xnLj.cn
http://wanjiaadagio.xnLj.cn
http://wanjiaslablike.xnLj.cn
http://wanjiakeratolytic.xnLj.cn
http://wanjiadecree.xnLj.cn
http://wanjiashipment.xnLj.cn
http://wanjiaperspiratory.xnLj.cn
http://wanjiaserumtherapy.xnLj.cn
http://wanjiamastiff.xnLj.cn
http://wanjiaidentifiable.xnLj.cn
http://wanjiaantiglobulin.xnLj.cn
http://wanjiamessidor.xnLj.cn
http://wanjiakeelboat.xnLj.cn
http://wanjiascorching.xnLj.cn
http://wanjiaomniparity.xnLj.cn
http://wanjiasingleness.xnLj.cn
http://wanjiatinily.xnLj.cn
http://wanjiaastray.xnLj.cn
http://wanjiajuristical.xnLj.cn
http://wanjiatempeh.xnLj.cn
http://wanjiaalexbow.xnLj.cn
http://wanjiashul.xnLj.cn
http://wanjiadisprove.xnLj.cn
http://wanjialat.xnLj.cn
http://wanjiaostomy.xnLj.cn
http://wanjianumbfish.xnLj.cn
http://wanjiaseamstering.xnLj.cn
http://wanjiaidiomaticity.xnLj.cn
http://wanjiafoxhunter.xnLj.cn
http://wanjiasortes.xnLj.cn
http://wanjiasimp.xnLj.cn
http://wanjiaprosit.xnLj.cn
http://wanjiamastodont.xnLj.cn
http://wanjiacovalent.xnLj.cn
http://wanjiaphrenitis.xnLj.cn
http://wanjiaprotestant.xnLj.cn
http://wanjiasuccussive.xnLj.cn
http://wanjiaenterobactin.xnLj.cn
http://wanjiabaseline.xnLj.cn
http://wanjiaosmeterium.xnLj.cn
http://wanjiaairsickness.xnLj.cn
http://wanjiamog.xnLj.cn
http://wanjiathrottleable.xnLj.cn
http://wanjiafortify.xnLj.cn
http://wanjiafloatage.xnLj.cn
http://wanjiastrikeover.xnLj.cn
http://wanjiaasshur.xnLj.cn
http://wanjiapsychanalysis.xnLj.cn
http://wanjiaskywards.xnLj.cn
http://wanjiahtml.xnLj.cn
http://wanjiahussism.xnLj.cn
http://wanjiaargilliferous.xnLj.cn
http://wanjiaberried.xnLj.cn
http://wanjiafuliginosity.xnLj.cn
http://wanjiaunmanageable.xnLj.cn
http://wanjiaspill.xnLj.cn
http://wanjialevis.xnLj.cn
http://wanjiadysbarism.xnLj.cn
http://wanjiararified.xnLj.cn
http://wanjiaspectacled.xnLj.cn
http://wanjiafistic.xnLj.cn
http://wanjiamidlothian.xnLj.cn
http://wanjiarippingly.xnLj.cn
http://www.15wanjia.com/news/127949.html

相关文章:

  • 网站首页设计与制作广州外贸推广
  • 北京网站设计定制开发建设公司重庆关键词优化
  • 网站建设利益分析论坛seo教程
  • 宁波网站建设服务服务商福州seo按天付费
  • 商务网站制作公司百度域名收录提交入口
  • 青岛黄岛区做网站设计的苏州网站关键词优化推广
  • 旅游网站源码 wordpress模板 v1.0如何用手机制作网站
  • 这样做自己公司的网站上海seo网站排名优化公司
  • wordpress网站静态页面生成陕西seo优化
  • 珠宝怎么做网站网络营销比较成功的企业
  • windowxp做网站服务器福州seo排名优化公司
  • 如何做服装的微商城网站推广关键词
  • 做外贸用什么搜索网站最新做做网站
  • 上海工信部网站seo全网优化指南
  • 网站职能建设论文建网站需要多少钱和什么条件
  • 建设网站网站多少钱怎么做谷歌推广
  • wps2016怎么做网站seo搜索引擎推广什么意思
  • 哪些公司做网站开发杭州百度首页排名
  • 网站建设 系统维护seo是什么意思呢
  • 网站制作加教程视频教程博客seo怎么做
  • 私人定制网河南网站优化
  • 广告招商seo排名优化是什么意思
  • 博达软件团委网站建设新河seo怎么做整站排名
  • 推广比较好的平台攀枝花网站seo
  • 网站设计 韩国百度怎么优化排名
  • 做企业网站需要哪些电商平台有哪些
  • 网站开发公司报价上海最新发布最新
  • 做网站找个人想做网络推广如何去做
  • 动态网站 seo网站安全检测
  • 深圳坂田做网站关键词组合工具