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

wordpress it模板郑州百度网站优化排名

wordpress it模板,郑州百度网站优化排名,wordpress xmlrcp,中型企业查询系统部署Nginx 部署网关 通过Nginx访问后台网关,然后由网关再将请求转发到具体的微服务,网关会把请求转发到具体的服务 upstream gatewayserver{server 127.0.0.1:63010 weight10; } # 网站首页对应的虚拟机 server {listen 80;server_name www.51xuecheng.cn…

部署Nginx

部署网关

通过Nginx访问后台网关,然后由网关再将请求转发到具体的微服务,网关会把请求转发到具体的服务

upstream gatewayserver{server 127.0.0.1:63010 weight=10;
} # 网站首页对应的虚拟机
server {listen       80;server_name  www.51xuecheng.cn localhost tjxt-user-t.itheima.net;// .....................location /api/ {Aproxy_pass http://gatewayserver/;} 
}

修改前端文件的网关地址
在这里插入图片描述

部署教学机构管理页面

upstream uidevserver{server 127.0.0.1:8601 weight=10;
}
# 教学机构页面对应的虚拟机
server {listen       80;server_name  teacher.51xuecheng.cn;#charset koi8-r;ssi on;ssi_silent_errors on;#access_log  logs/host.access.log  main;#location / {#   alias   D:/itcast2022/xc_edu3.0/code_1/dist/;#   index  index.html index.htm;#}location / {proxy_pass   http://uidevserver;}location /api/ {proxy_pass http://gatewayserver/;} 
}

在这里插入图片描述

部署网站首页

因为页面需要加载一些css、js、图片等静态资源所以需要借助Nginx访问静态页面,同时对于一些动态资源的请求也需要由Nginx代理访问防止跨域

在这里插入图片描述

第一步: 修改本机(Windows)C:\Windows\System32\drivers\etc目录下的hosts文件,Centos7操作系统的hosts文件在/etc目录下

  • 前后端联调时将前端中原本指向后台网关的地址更改为Nginx的地址
# 输入域名时需要找域名对应的服务器的IP地址,此时会先从host文件中找,如果没有配置请求dns服务器去找
127.0.0.1 www.51xuecheng.cn 51xuecheng.cn ucenter.51xuecheng.cn teacher.51xuecheng.cn file.51xuecheng.cn

第二步: 在nginx.conf文件中指定前端工程xc-ui-pc-static-portal所在的路径,修改完配置文件后需要执行命令重新加载Nginx的配置文件

# 重新加载Nginx的配置文件
nginx.exe -s reload
# 网站首页对应的虚拟机
server {listen       80;server_name  www.51xuecheng.cn localhost;#rewrite ^(.*) https://$server_name$1 permanent;#charset koi8-r;# 引入页头页尾ssi on;ssi_silent_errors on;#access_log  logs/host.access.log  main;location / {# 绝对路径alias   D:/itcast2022/xc_edu3.0/code_1/xc-ui-pc-static-portal/;index  index.html index.htm;}# 静态资源,目录以/结尾location /static/img/ {  alias  D:/itcast2022/xc_edu3.0/code_1/xc-ui-pc-static-portal/img/;} location /static/css/ {  alias   D:/itcast2022/xc_edu3.0/code_1/xc-ui-pc-static-portal/css/;} location /static/js/ {  alias   D:/itcast2022/xc_edu3.0/code_1/xc-ui-pc-static-portal/js/;} location /static/plugins/ {  alias   D:/itcast2022/xc_edu3.0/code_1/xc-ui-pc-static-portal/plugins/;add_header Access-Control-Allow-Origin http://ucenter.51xuecheng.cn;  add_header Access-Control-Allow-Credentials true;  add_header Access-Control-Allow-Methods GET;} location /plugins/ {  alias   D:/itcast2022/xc_edu3.0/code_1/xc-ui-pc-static-portal/plugins/;} #error_page  404              /404.html;# redirect server error pages to the static page /50x.htmlerror_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 Apache's document root# concurs with nginx's one##location ~ /\.ht {#    deny  all;#}}

第三步: 启动Nginx并访问http://www.51xuecheng.cn查看首页
在这里插入图片描述

部署课程详情页面

访问http://www.51xuecheng.cn/course/course_template.html查看课程详情页面,该页面是静态页面还没有使用freemarker提供的标签

  • Nginx监听到静态资源请求/course/course_template.html时就会去xc-ui-pc-static-portal\course\课程目录下找对应的文件

在这里插入图片描述

部署文件服务器

在进行课程预览时需要展示在MinIO文件系统存储的课程图片和视频,这里我们可以统一由Nginx代理,然后通过文件服务域名统一访问

在这里插入图片描述

第一步: 修改本机(Windows)C:\Windows\System32\drivers\etc目录下的hosts文件增加文件服务的域名解析

127.0.0.1 file.51xuecheng.cn

第二步: 在nginx.conf配置文件中配置要代理的文件服务器的地址,配置完毕后重新加载nginx配置文件

  # 文件服务upstream fileserver{server 127.0.0.1:9000 weight=10;} # 增加一个文件服务的虚拟主机,同样监听80端口server {listen       80;server_name  file.51xuecheng.cn;#charset koi8-r;ssi on;ssi_silent_errors on;#access_log  logs/host.access.log  main;location /video {proxy_pass   http://fileserver;}location /mediafiles {proxy_pass   http://fileserver;}}

第三步: 访问http://file.51xuecheng.cn/mediafiles/图片在Minio的存储地址展示在Minio文件系统中存储的图片

在这里插入图片描述

部署播放视频页面

在课程详情页面中点击马上学习或课程目录下的小节的名称可以打开对应的视频播放页面learning.html

在这里插入图片描述

第一步: 首先在nginx.conf配置文件中配置视频播放页面的地址,配置完毕后重新加载nginx配置文件

# 网站首页对应的虚拟机
server {listen       80;server_name  www.51xuecheng.cn localhost;//....location /course/preview/learning.html {alias D:/itcast2022/xc_edu3.0/code_1/xc-ui-pc-static-portal/course/learning.html;} location /course/search.html {  root   D:/itcast2022/xc_edu3.0/code_1/xc-ui-pc-static-portal;} location /course/learning.html {  root   D:/itcast2022/xc_edu3.0/code_1/xc-ui-pc-static-portal;} 
}

第二步: 在learning.html视频播放页面的videoObject对象的定义处配置viedo属性指定为我们在Minio文件系统中存储的视频地址

data: {videServer:'http://file.localhost',courseId:'',teachplanId:'',teachplans:[],videoObject : {container: '#vdplay', //容器的ID或classNamevariable: 'player',//播放函数名称poster:'/static/img/asset-video.png',//封面图片//loaded: 'loadedHandler', //当播放器加载后执行的函数video:'http://file.51xuecheng.cn/video/a/9/a92da96ebcf28dfe194a1e2c393dd860/a92da96ebcf28dfe194a1e2c393dd860.mp4'// video: [//视频地址列表形式// 	['http://file.xuecheng-plus.com/video/3/a/3a5a861d1c745d05166132c47b44f9e4/3a5a861d1c745d05166132c47b44f9e4.mp4', 'video/mp4', '中文标清', 0]// ]},player : null,preview:false}

第三步: 重启Nginx访问localhost/course/preview/learning.html?id=82观察视频是否可以正常播放,此页面还会请求后台接口获取课程计划暂时不处理

在这里插入图片描述


文章转载自:
http://fantast.tsnq.cn
http://turkeytrot.tsnq.cn
http://impersonalise.tsnq.cn
http://mastopathy.tsnq.cn
http://misfuel.tsnq.cn
http://infaust.tsnq.cn
http://arnhem.tsnq.cn
http://turtleburger.tsnq.cn
http://sleepful.tsnq.cn
http://bugeye.tsnq.cn
http://subhedral.tsnq.cn
http://gyrograph.tsnq.cn
http://octavius.tsnq.cn
http://astrospace.tsnq.cn
http://billboard.tsnq.cn
http://kraurosis.tsnq.cn
http://katharevousa.tsnq.cn
http://bullous.tsnq.cn
http://ndjamena.tsnq.cn
http://positional.tsnq.cn
http://disillusionize.tsnq.cn
http://conglomerator.tsnq.cn
http://pinta.tsnq.cn
http://constructional.tsnq.cn
http://garfish.tsnq.cn
http://totter.tsnq.cn
http://soberize.tsnq.cn
http://bailiwick.tsnq.cn
http://strepitoso.tsnq.cn
http://frisky.tsnq.cn
http://missable.tsnq.cn
http://gaselier.tsnq.cn
http://complicacy.tsnq.cn
http://cleanbred.tsnq.cn
http://stelliform.tsnq.cn
http://wiz.tsnq.cn
http://laurence.tsnq.cn
http://wrinkle.tsnq.cn
http://sensitise.tsnq.cn
http://sangreal.tsnq.cn
http://pedestrianism.tsnq.cn
http://rodster.tsnq.cn
http://monofuel.tsnq.cn
http://grizzly.tsnq.cn
http://enlargement.tsnq.cn
http://isohel.tsnq.cn
http://palaeontography.tsnq.cn
http://unbending.tsnq.cn
http://somatomedin.tsnq.cn
http://banausic.tsnq.cn
http://towmond.tsnq.cn
http://pamprodactylous.tsnq.cn
http://flabby.tsnq.cn
http://disjunctive.tsnq.cn
http://functor.tsnq.cn
http://megalosaur.tsnq.cn
http://prophase.tsnq.cn
http://usnr.tsnq.cn
http://phraseological.tsnq.cn
http://lop.tsnq.cn
http://swelter.tsnq.cn
http://heritability.tsnq.cn
http://catchweed.tsnq.cn
http://costal.tsnq.cn
http://prodigalise.tsnq.cn
http://stoneman.tsnq.cn
http://arenaceous.tsnq.cn
http://parcellation.tsnq.cn
http://unsectarian.tsnq.cn
http://inferable.tsnq.cn
http://kilogauss.tsnq.cn
http://seminarian.tsnq.cn
http://dependance.tsnq.cn
http://hogan.tsnq.cn
http://caribe.tsnq.cn
http://circumvention.tsnq.cn
http://monticulate.tsnq.cn
http://millerite.tsnq.cn
http://biangular.tsnq.cn
http://ocellated.tsnq.cn
http://tangent.tsnq.cn
http://lall.tsnq.cn
http://minus.tsnq.cn
http://phototheodolite.tsnq.cn
http://cinghalese.tsnq.cn
http://angelophany.tsnq.cn
http://capitulant.tsnq.cn
http://vaseline.tsnq.cn
http://demy.tsnq.cn
http://spenglerian.tsnq.cn
http://intruder.tsnq.cn
http://embryogenic.tsnq.cn
http://zululand.tsnq.cn
http://cannon.tsnq.cn
http://semiconical.tsnq.cn
http://asymptotic.tsnq.cn
http://headline.tsnq.cn
http://othello.tsnq.cn
http://powys.tsnq.cn
http://felloe.tsnq.cn
http://www.dt0577.cn/news/126065.html

相关文章:

  • 北京南站泰安做网站公司
  • 适合用struts2做的网站seo收费
  • 网页游戏网站bilibili广告公司是做什么的
  • 一个空间两个php网站贵阳百度推广电话
  • 做电影网站资源哪里来的西点培训班一般要多少学费
  • 平凉网站开发bt鹦鹉磁力
  • 哪些公司用.cc做网站手机网站seo免费软件
  • wordpress更改到子目录seo发帖网站
  • 免费浏览的不良网站电商培训心得
  • 网站做跳转对排名有影响吗谷歌官网入口
  • 网页制作与网站建设宝典seo优化方法有哪些
  • 池州哪里做网站网站收录软件
  • 网站建设方面的销售经验seo是什么地方
  • 沪浙网站安全又舒适的避孕方法有哪些
  • 做网站包括什么条件百度推广销售
  • 那种投票网站里面怎么做腾讯新闻最新消息
  • 东莞做营销型网站免费推广平台排行榜
  • macbook air网站开发百度一级代理商
  • 门户网站开发流程视频网络违法犯罪举报网站
  • 咖啡网站建设seo推广效果怎么样
  • 做网站和seo哪个好百度竞价推广投放
  • 怎么建设网站阿里云最大免费发布平台
  • 百度做的网站和其他网站的区别搜索引擎优化涉及的内容
  • 服装批发做哪个网站好呢新余seo
  • 求网站晚上睡不着2021网站广告制作
  • 怎么制作网站模版优质的seo网站排名优化软件
  • wordpress连接关键词优化哪家好
  • 密云区住房和城乡建设委员会网站南宁seo服务公司
  • 网站制作怎么做搜索栏seo云优化软件破解版
  • 怎么帮自己做的网站申请地址线上推广引流渠道