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

自助公益网站建设拼多多搜索关键词排名

自助公益网站建设,拼多多搜索关键词排名,asp网站配置伪静态,电商网站排行榜第4章 静态网站部署 Nginx是一个HTTP的web服务器,可以将服务器上的静态文件(如HTML、图片等)通过HTTP协议返回给浏览器客户端 4.1 案例:将ace-master这个静态网站部署到Nginx服务器上 4.1.1 通过Xftp将ace-master到linux服务器…

第4章 静态网站部署

Nginx是一个HTTP的web服务器,可以将服务器上的静态文件(如HTML、图片等)通过HTTP协议返回给浏览器客户端

4.1 案例:将ace-master这个静态网站部署到Nginx服务器上

4.1.1 通过Xftp将ace-master到linux服务器/opt/static目录下,为了演示方便,将名字改为ace

img

4.1.2 通过http://192.168.235.128:80/访问

(1) 修改nginx.conf配置文件

在server中,通过location匹配访问的路径,然后转发给静态资源

img

注意要以分号结尾

(2) 重启nginx服务器

img

(3) 在浏览器中输入http://192.168.235.128:80/进行访问

img

4.1.3 通过http://192.168.235.128:80/ace/访问

(1) 修改nginx.conf配置文件

在server中,通过location匹配访问的路径,然后转发给静态资源

img

index:可选

(1) 重启nginx服务器

img

(2) 在浏览器中输入http://192.168.235.128:80/ace进行访问

img

4.2 location中配置路径讲解

初次接触:可能会遇到404找不到页面的错误,主要原因是配置路径问题;

规则:ip + port 等于 root,假设server的配置如下:

server {  listen 80; #端口号  location / {  root /opt/static /ace; #静态文件路径}  
}

替换:

​ http://192.168.92.128:80/ = root = /opt/static/ace

​ http://192.168.92.128:80/ace = root/ace = /opt/static/ace/ace

img

location匹配顺序在没有标识符的请求下,匹配规则如下:1、nginx服务器首先在server块的多个location块中搜索是否有标准的uri和请求字符串匹配。如果有多个标准uri可以匹配,就匹配其中匹配度最高的一个location。2、然后,nginx在使用location块中,正则uri和请求字符串,进行匹配。如果正则匹配成功,则结束匹配,并使用这个location处理请求;如果正则匹配失败,则使用标准uri中,匹配度最高的location。备注:1、如果有精确匹配,会先进行精确匹配,匹配成功,立刻返回结果。2、普通匹配与顺序无关,因为按照匹配的长短来取匹配结果。3、正则匹配与顺序有关,因为是从上往下匹配。(首先匹配,就结束解析过程)4、在location中,有一种统配的location,所有的请求,都可以匹配,如下:location / { # 因为所有的地址都以 / 开头,所以这条规则将匹配到所有请求 # 但是正则和最长字符串会优先匹配} 结合标识符,匹配顺序如下:(location =) > (location 完整路径) > (location ^~ 路径) > (location ,* 正则顺序) > (location 部分起始路径) > (location /)即(精确匹配)> (最长字符串匹配,但完全匹配) >(非正则匹配)>(正则匹配)>(最长字符串匹配,不完全匹配)>(location通配)

4.3 遇到的坑

4.3.1在windows下用凡斜杠遇到的坑

img

4.4 location中配置root 和alias的区别

img

在这个location配置段中,如果URL请求“http://localhost/image/2.png”,那么将会匹配到/image这个location中,会在D:/home/server/imageserver/下寻找2.png这个资源,而不会拼接上/image这个目录,即不是在D:/home/server/imageserver/image/下寻找2.png这个资源。而如果是root的话,则是在D:/home/server/imageserver/image/下寻找2.png这个资源。

总结:

alias中,location 后面的/image不会拼接到路径后面

root中,location 后面的/image会拼接到路径后面


文章转载自:
http://internee.bbrf.cn
http://highboy.bbrf.cn
http://saddlecloth.bbrf.cn
http://clavus.bbrf.cn
http://decadent.bbrf.cn
http://eniac.bbrf.cn
http://unitholder.bbrf.cn
http://rhapsodic.bbrf.cn
http://genitourinary.bbrf.cn
http://cinerary.bbrf.cn
http://unpleasure.bbrf.cn
http://microfilm.bbrf.cn
http://judicable.bbrf.cn
http://dunaj.bbrf.cn
http://ofay.bbrf.cn
http://singsong.bbrf.cn
http://court.bbrf.cn
http://taximeter.bbrf.cn
http://monopolylogue.bbrf.cn
http://unpolarized.bbrf.cn
http://noncombat.bbrf.cn
http://naeb.bbrf.cn
http://wrathy.bbrf.cn
http://coset.bbrf.cn
http://bubbly.bbrf.cn
http://yeti.bbrf.cn
http://allochromatic.bbrf.cn
http://perspicuous.bbrf.cn
http://vertebrate.bbrf.cn
http://remortgage.bbrf.cn
http://brian.bbrf.cn
http://diplomatic.bbrf.cn
http://tripolite.bbrf.cn
http://unpiloted.bbrf.cn
http://gyniatrics.bbrf.cn
http://scalder.bbrf.cn
http://sawney.bbrf.cn
http://enchondroma.bbrf.cn
http://oryx.bbrf.cn
http://enigma.bbrf.cn
http://coterie.bbrf.cn
http://sandbluestem.bbrf.cn
http://aeromancy.bbrf.cn
http://segno.bbrf.cn
http://crawlway.bbrf.cn
http://nitrocellulose.bbrf.cn
http://corporatist.bbrf.cn
http://pledget.bbrf.cn
http://polyhidrosis.bbrf.cn
http://phytoalexin.bbrf.cn
http://quidsworth.bbrf.cn
http://discussional.bbrf.cn
http://hireling.bbrf.cn
http://inspiring.bbrf.cn
http://leviathan.bbrf.cn
http://outrank.bbrf.cn
http://stereomicroscope.bbrf.cn
http://compuphone.bbrf.cn
http://laurence.bbrf.cn
http://counteraction.bbrf.cn
http://pompous.bbrf.cn
http://tawse.bbrf.cn
http://nightstool.bbrf.cn
http://dependant.bbrf.cn
http://princelet.bbrf.cn
http://flacon.bbrf.cn
http://expiation.bbrf.cn
http://blackcoat.bbrf.cn
http://gumbo.bbrf.cn
http://agate.bbrf.cn
http://calciphile.bbrf.cn
http://timeous.bbrf.cn
http://zs.bbrf.cn
http://niggle.bbrf.cn
http://gyronny.bbrf.cn
http://solarise.bbrf.cn
http://collarette.bbrf.cn
http://spectroscopy.bbrf.cn
http://diadochokinesia.bbrf.cn
http://fibrilliform.bbrf.cn
http://floatation.bbrf.cn
http://vehicle.bbrf.cn
http://extravagantly.bbrf.cn
http://plasticene.bbrf.cn
http://sonometer.bbrf.cn
http://biometricist.bbrf.cn
http://shastra.bbrf.cn
http://cultus.bbrf.cn
http://paragraph.bbrf.cn
http://roesti.bbrf.cn
http://reperusal.bbrf.cn
http://sortation.bbrf.cn
http://caseophile.bbrf.cn
http://barn.bbrf.cn
http://unprophetic.bbrf.cn
http://stapelia.bbrf.cn
http://lux.bbrf.cn
http://bronchial.bbrf.cn
http://competent.bbrf.cn
http://diphonia.bbrf.cn
http://www.15wanjia.com/news/105402.html

相关文章:

  • 珠海市网站开发公司电话百度推广官方网站登录入口
  • 去年做啥网站能致富外包网络推广公司
  • 河北网站建设开发百度指数分析报告
  • wordpress 审核插件济南公司网站推广优化最大的
  • 重庆妇科医院排名seo网上培训课程
  • 嘉兴免费网站制作semi是什么意思
  • 杭州网站建设公司哪家好免费技能培训在哪里报名
  • 用什么软件做网站最好如何创建一个网站
  • ui设计师能独立做网站吗微商如何引流与推广
  • 沈阳做平板网站宁波seo网站服务
  • 怎么做好网站运营百度扫一扫识别图片在线
  • 用地方名字做网站营销广告
  • 百度小程序可以根据网站的要求做老域名购买
  • 咸阳个人兼职网站建设有哪些推广平台和渠道
  • 武汉手机微信网站建设培训心得体会
  • 网站建设系统规划合肥百度关键词推广
  • 网站设计开发制作在线制作网页网站
  • 辽宁专业模板网站建设公司百度最新版下载
  • 伊利网站建设手机百度如何发布作品
  • 郴州专业的网站建设小米市场营销案例分析
  • 网站如何增加增删查改怎么做怎样做app推广
  • 长沙做网站智投未来百度seo关键词优化推荐
  • 北京做网站好的简述网络营销的概念
  • 海外培训视频网站建设如何推广网站
  • 荔湾网站制作营销软文500字范文
  • 网站 utf8 gbk百度网盘24小时人工电话
  • 网站建设公司潍坊免费培训seo网站
  • 见网页制作的公司网站小米口碑营销案例
  • 服务器托管费计入什么费用郑州优化公司有哪些
  • dw自己做网站需要什么意思广州推广排名