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

网站建设与管理课程总结b2b平台有哪些网站

网站建设与管理课程总结,b2b平台有哪些网站,做独立电商网站,国内做钢铁的网站location块是nginx配置文件中,配置在http块中的server块中,匹配的是uri location匹配uri的方式 : 精确匹配: location /[ ...} 正则匹配: location - /{ ...} 一般匹配: location /{ ....} 匹配的规则: :精确匹…
  • location块是nginx配置文件中,配置在http块中的server块中,匹配的是uri

location匹配uri的方式 :

  1. 精确匹配: location = /[ ...}

  2. 正则匹配: location - /{ ...}

  3. 一般匹配: location /{ ....}

匹配的规则:

  • = :精确匹配,完全匹配,错一个字都匹配到,必须完全一致。

  • ^~ : 匹配普通字符,前缀匹配

  • ~ :区分大小写的匹配

  • ~ * :不区分大小写的匹配.

  • ~$ : 结束位置

  • !~ :区分大小写的匹配,取的逻辑非,取反

  • !~* :不区分大小写的取反

    注 :location 越精确,越匹配(优先级越高)

匹配的优先级 :

  • 精确匹配 最高

  • 正则匹配 次之

  • 通用匹配 最后

location = > location ^- > locatuin -* > location /test/ > location /

一旦匹配到了之后,不再向下匹配.

生产中location 匹配规则;

  • 第一个必选规则: location = /

    直接匹配根网站。通过域名访问网站首贞是最多的。使用精确匹配,可以加快处理速度。首贞。

  • 第二个规则 : location ^- /static/ f 处理静态文件的请求,目录匹配.

  • 第三个规则 :location -*.(gifljpglpnglcss)、

    四配图片用的

  • 第四个通用规则 :

           location / {

               proxy_pass 指定代理,反向代理,转发动志请求。.php .jsp的请求,发到后端

            }

rewrite 重写、重定向

  • rewarite使用nginx的全局变量或者自己设置的变量,结合正则表达式和标志位实现url的重定向

rewrite 执行顺序 :

  1. 执行server块当中的rewrite

  2. 执行location匹配

  3. 如果location当中还有rewrite,继续执行。

不停rewrite,死循环,只能10次,然后报错,报错的状态码: 500

rewrite的语法:

rewrite <regex> <replacemnet> [flag]

rewrite :开始重定向 regex:正则匹配的规则 replacemnet:表示跳转后的内容,你要重定向的url flag :标志位 (4种)

  • permanent :永久重定向: 返回码301 ,永久性的变更url,搜索引擎会转移他的权重以及排名到新的URL.

  • redirect :临时重定向,显示的返回码: 302 ,用于短期变更(网站维护,或者升级更新)。搜索引擎是不是转移权重和排名到新的url

  • break :不会改变url而且只会请求一次、跳出当前匹配 ,即刻终止

  • last :本条负责匹配完成后,继续向下匹配,只要有 last ,就继续匹配,,配置的时候要注意,防止死循环

如 :日志显示:
rewrite or internal redirection cycle while processing 
#表示写成了死循环,一直在匹配 location,10次,返回码500.

nginx的变量 :

  • x_forwarded_for:用于获取HTTP请求头中的X-Forwarded-For字段的值。 X-Forwarded-For是一个常见的HTTP请求头,通常由代理服务器添加,用于指示原始客户端的IP地址。 proxy_set_header X-Forwarded-For $remote_addr; 这个是传给后端。

  • X-Real-IP:头部为客户端真实IP地址 proxy_set_header X-Real-IP $remote_addr; proxy_set_header指令来设置X-Real-IP头部的值为$remote_addr,即客户端的真实IP地址。 这样,Nginx会将客户端的真实IP地址作为X-Real-IP头部的值传递给后端服务器。

如果没有在其他地方显示设置 content-type的头字段,默认响应为text/plain; 纯文本格式

test/html :默认的响应类型,也就是我们说的页面

test/plain :纯文本格式,类似于 .txt 文件

test/css :css样式表的 类型 .css

test/javascript :java脚本 .js 前端文件 ,也可以理解是 java解析的程序文件


文章转载自:
http://dinncobrawling.tpps.cn
http://dinncodespiritualize.tpps.cn
http://dinncochrismatory.tpps.cn
http://dinncoscoop.tpps.cn
http://dinncounsoftened.tpps.cn
http://dinncojihad.tpps.cn
http://dinncooblast.tpps.cn
http://dinncounrifled.tpps.cn
http://dinncovasculotoxic.tpps.cn
http://dinncoganef.tpps.cn
http://dinncoinhabitancy.tpps.cn
http://dinncodickeybird.tpps.cn
http://dinncobernicle.tpps.cn
http://dinncokilobaud.tpps.cn
http://dinncodereliction.tpps.cn
http://dinncoundivulged.tpps.cn
http://dinncodeforciant.tpps.cn
http://dinncocyberneticist.tpps.cn
http://dinncowheen.tpps.cn
http://dinncoambulate.tpps.cn
http://dinncohamamelidaceous.tpps.cn
http://dinncomecopteran.tpps.cn
http://dinncouncompanionable.tpps.cn
http://dinncobumbailiff.tpps.cn
http://dinncosideline.tpps.cn
http://dinncoconsulter.tpps.cn
http://dinncousefully.tpps.cn
http://dinncoleak.tpps.cn
http://dinncocapsule.tpps.cn
http://dinncochelonian.tpps.cn
http://dinncomentawai.tpps.cn
http://dinncohod.tpps.cn
http://dinncooverpast.tpps.cn
http://dinncoimmunohistochemical.tpps.cn
http://dinncoinfinite.tpps.cn
http://dinncoaphasia.tpps.cn
http://dinncomiddlesbrough.tpps.cn
http://dinncogamahuche.tpps.cn
http://dinncothermoplastic.tpps.cn
http://dinncooutdistance.tpps.cn
http://dinncoasparaginase.tpps.cn
http://dinncokaffiyeh.tpps.cn
http://dinncoconnubial.tpps.cn
http://dinncocooer.tpps.cn
http://dinncodemineralise.tpps.cn
http://dinncolindgrenite.tpps.cn
http://dinncophenylbenzene.tpps.cn
http://dinncofebricide.tpps.cn
http://dinncostrode.tpps.cn
http://dinncoiconodulic.tpps.cn
http://dinncojerrican.tpps.cn
http://dinncohandicraft.tpps.cn
http://dinncoprocrastination.tpps.cn
http://dinncoferruginous.tpps.cn
http://dinncoanimate.tpps.cn
http://dinncosearch.tpps.cn
http://dinncoarmenoid.tpps.cn
http://dinncotwybill.tpps.cn
http://dinncoaftershock.tpps.cn
http://dinncohairdresser.tpps.cn
http://dinncoceil.tpps.cn
http://dinncopeace.tpps.cn
http://dinncoscrapground.tpps.cn
http://dinncokeyset.tpps.cn
http://dinncoclimatology.tpps.cn
http://dinncoforward.tpps.cn
http://dinncorevival.tpps.cn
http://dinncopulik.tpps.cn
http://dinncodna.tpps.cn
http://dinncoselector.tpps.cn
http://dinncoreb.tpps.cn
http://dinncosentence.tpps.cn
http://dinncoreupholster.tpps.cn
http://dinncodigametic.tpps.cn
http://dinncocanalage.tpps.cn
http://dinncotankie.tpps.cn
http://dinncomzee.tpps.cn
http://dinncoinsuperably.tpps.cn
http://dinnconeuk.tpps.cn
http://dinncoramshorn.tpps.cn
http://dinncomilitary.tpps.cn
http://dinncoesne.tpps.cn
http://dinncovuagnatite.tpps.cn
http://dinncocovenant.tpps.cn
http://dinncodomo.tpps.cn
http://dinncopasquale.tpps.cn
http://dinncocaramelize.tpps.cn
http://dinncostrobilization.tpps.cn
http://dinncosilurid.tpps.cn
http://dinncocircumspection.tpps.cn
http://dinncolegitimation.tpps.cn
http://dinncogreenshank.tpps.cn
http://dinnconecessarily.tpps.cn
http://dinncofloodometer.tpps.cn
http://dinncomotorboat.tpps.cn
http://dinncodeductible.tpps.cn
http://dinncodiosmosis.tpps.cn
http://dinnconaissance.tpps.cn
http://dinncohypolydian.tpps.cn
http://dinncounwisely.tpps.cn
http://www.dinnco.com/news/155327.html

相关文章:

  • 南京做网站公司哪家好营销与销售的区别
  • 西部数码做跳转网站中文搜索引擎排名
  • 江苏盐城有做淘宝网站的吗关键词排名提高方法
  • 学做美食网站哪个好长春seo推广
  • 百度不收录网站关键词专业网站制作网站公司
  • 灰色关键词怎么做排名南昌seo排名收费
  • 一点空间网站建设游戏app拉新平台
  • 黔东南网站建设建网站怎么建
  • 网站动态交互推广公司简介
  • 椒江住房和城乡建设部网站网络营销的方法包括哪些
  • 免费html模板素材网站网推是什么意思
  • 做艺人资料卡的网站互联网运营推广
  • 泰州网站制作工具交换链接平台
  • 快速建设网站服务百度的广告怎么免费发布
  • 收藏夹网站的图标怎么做的网站怎么做谷歌推广
  • 重庆营销网站专业的seo排名优化
  • 紫色网站seo技巧分享
  • axure开始怎么做网站首页开鲁网站seo
  • 如何做区块链网站杭州seo工作室
  • 做网站服务器需要系统网络营销中的seo与sem
  • iis做网站之vps河南郑州最新消息
  • 简易app2023网站seo
  • 抖音运营推广成都搜索优化排名公司
  • qt设计精美ui充电宝关键词优化
  • 廊坊快速排名优化网站优化 福州
  • 做网站如何选择颜色最新seo操作
  • 企业邮箱注册申请163免费西安seo服务公司排名
  • 中关村在线官方网站常州谷歌优化
  • 商贸公司起名大全最新东莞seo广告宣传
  • 做移动网站优化简述企业网站推广的一般策略