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

wordpress主题和插件西安网络推广优化培训

wordpress主题和插件,西安网络推广优化培训,那个b2b网站可以做外贸,wordpress 添加订阅文章目录 1.‌Traefik安装2.启动nginx配置路由 本文档只是为了留档方便以后工作运维,或者给同事分享文档内容比较简陋命令也不是特别全,不适合小白观看,如有不懂可以私信,上班期间都是在得 前言,领导让我调研在线发布得…

文章目录

  • 1.‌Traefik安装
  • 2.启动nginx配置路由

本文档只是为了留档方便以后工作运维,或者给同事分享文档内容比较简陋命令也不是特别全,不适合小白观看,如有不懂可以私信,上班期间都是在得

前言,领导让我调研在线发布得技术选型
白话文就是,子级域名 a.xx.com,b.xx.com 访问可以对应到服务器得某个服务例如20001,20002端口得服务
第一时间我想到得是nginx进行调用转发,但是就会出现一个问题没办法动态更新转发配置,重启再快也需要时间。
后面经过某群友推荐得‌Traefik实现了目的

1.‌Traefik安装

使用docker-compse进行安装
创建一个treafik.yml

version: '3.7'services:traefik:image: traefik:v2.10container_name: traefik   command:- "--entrypoints.http.address=:80"- "--entrypoints.https.address=:443"- "--api=true"- "--api.insecure=true"- "--api.dashboard=true"- "--api.debug=false"- "--ping=true"- "--providers.docker=true"- "--providers.docker.watch=true"- "--providers.docker.exposedbydefault=false"- "--providers.docker.endpoint=unix:///var/run/docker.sock"- "--providers.docker.swarmMode=false"- "--providers.docker.useBindPortIP=false"- "--providers.docker.network=traefik"- "--providers.file=true"- "--providers.file.watch=true"- "--providers.file.directory=/etc/traefik/config"- "--providers.file.debugloggeneratedtemplate=true"ports:- "80:80"                                  # HTTP- "443:443"                                # HTTPS- "9999:8080"                             # Web UI 端口(通过 --api.insecure=true 启用)volumes:- "/var/run/docker.sock:/var/run/docker.sock"  # 允许 Traefik 访问 Docker API- "/home/docker/traefik/config:/etc/traefik/config"       # 这样 Traefik 可以监听 Docker 事件networks:- traefik  # 加入 traefik 网络
networks:traefik:driver: bridge  # 使用桥接网络
#启动traefik
docker-compose -f traefik.yml  up -d

启动traefik

2.启动nginx配置路由

nginx配置

user  nginx;
worker_processes  auto;pid        /var/run/nginx.pid;events {worker_connections  1024;
}http {client_max_body_size 10000M;  # 设置文件上传大小限制为20MBinclude       /etc/nginx/mime.types;default_type  application/octet-stream;underscores_in_headers on;log_format  main  '$remote_addr - $remote_user [$time_local] "$request" ''$status $body_bytes_sent "$http_referer" ''"$http_user_agent" "$http_x_forwarded_for"';sendfile        on;keepalive_timeout  65;
server {listen       20002;server_name www.b.xx.com;if ($request_method !~ ^(GET|POST|DELETE|PUT)$) {return 403;}charset utf-8;location / {root  /usr/share/nginx/html/dist;index index.html index.htm;try_files $uri $uri/ /index.html;client_max_body_size 5000m;client_body_buffer_size 500m; }}}

还是使用docker-compse进行安装
创建一个nginx.yml

version: '3.8'   services:nginx2:image: nginx:latest  # 使用最新的 Nginx 镜像container_name: nginx_2  # 容器名称ports:- "20002:20002" labels:- "traefik.enable=true"  # 启用 Traefik 处理该服务- "traefik.http.routers.nginx2.rule=Host(`www.b.xx.com`)"  # 路由规则- "traefik.http.routers.nginx2.entrypoints=http"  # 指定入口点- "traefik.http.services.nginx2.loadbalancer.server.port=20002"  # 指定 Nginx 服务端口volumes:- /home/nginx/02/html:/usr/share/nginx/html  # 映射前端文件- /home/nginx/02/conf/nginx.conf:/etc/nginx/nginx.conf  # 映射 Nginx 配置文件- /home/nginx/02/logs:/var/log/nginx  # 映射日志目录restart: always  # 容器崩溃后自动重启networks:- traefik  # 加入 traefik 网络networks:traefik:external: false  # 不使用外部网络,而是使用本地定义的网络
#启动nginx
docker-compose -f nginx.yml  up -d

启动nginx

我们看一下效果
效果对比图

二级域名访问正常,但是一级域名访问404
我们这里在多启动一个试试
启动命令

多个效果对比图

完美实现多级域名访问路由服务器nginx

如果点赞多,评论多会更新详细教程,待补充。


文章转载自:
http://personae.xxhc.cn
http://troubleproof.xxhc.cn
http://transtainer.xxhc.cn
http://fasciate.xxhc.cn
http://overburden.xxhc.cn
http://homomorphous.xxhc.cn
http://hungover.xxhc.cn
http://nautili.xxhc.cn
http://telesat.xxhc.cn
http://animato.xxhc.cn
http://notchboard.xxhc.cn
http://tetched.xxhc.cn
http://graveward.xxhc.cn
http://refining.xxhc.cn
http://viscoelastic.xxhc.cn
http://protogenic.xxhc.cn
http://irritative.xxhc.cn
http://froze.xxhc.cn
http://retsina.xxhc.cn
http://corvee.xxhc.cn
http://megahertz.xxhc.cn
http://vegetable.xxhc.cn
http://informed.xxhc.cn
http://kinfolk.xxhc.cn
http://dative.xxhc.cn
http://southeasternmost.xxhc.cn
http://subduce.xxhc.cn
http://tickler.xxhc.cn
http://elucidation.xxhc.cn
http://heme.xxhc.cn
http://yumpie.xxhc.cn
http://outskirt.xxhc.cn
http://dualpurpose.xxhc.cn
http://spinulated.xxhc.cn
http://redundance.xxhc.cn
http://silverbeater.xxhc.cn
http://plenum.xxhc.cn
http://sophisticate.xxhc.cn
http://illustriously.xxhc.cn
http://domiciliary.xxhc.cn
http://rainwear.xxhc.cn
http://deacylate.xxhc.cn
http://boredom.xxhc.cn
http://obviate.xxhc.cn
http://gastral.xxhc.cn
http://reification.xxhc.cn
http://respell.xxhc.cn
http://boniness.xxhc.cn
http://electrophorese.xxhc.cn
http://ginnery.xxhc.cn
http://mitzvah.xxhc.cn
http://evildoer.xxhc.cn
http://hydropsy.xxhc.cn
http://queenlike.xxhc.cn
http://poetry.xxhc.cn
http://spinosity.xxhc.cn
http://unwound.xxhc.cn
http://washy.xxhc.cn
http://pete.xxhc.cn
http://nav.xxhc.cn
http://fond.xxhc.cn
http://sillabub.xxhc.cn
http://spectacled.xxhc.cn
http://worrier.xxhc.cn
http://spindrift.xxhc.cn
http://hungover.xxhc.cn
http://testamentary.xxhc.cn
http://hoove.xxhc.cn
http://hapteron.xxhc.cn
http://experimentalize.xxhc.cn
http://neurohormonal.xxhc.cn
http://emancipatory.xxhc.cn
http://discalced.xxhc.cn
http://newsmaker.xxhc.cn
http://lusterless.xxhc.cn
http://actionless.xxhc.cn
http://playact.xxhc.cn
http://cincture.xxhc.cn
http://lied.xxhc.cn
http://snipey.xxhc.cn
http://boskage.xxhc.cn
http://barology.xxhc.cn
http://sark.xxhc.cn
http://centrism.xxhc.cn
http://accrescence.xxhc.cn
http://transmutative.xxhc.cn
http://nankeen.xxhc.cn
http://gentisate.xxhc.cn
http://neronian.xxhc.cn
http://heterochromosome.xxhc.cn
http://pitchout.xxhc.cn
http://penholder.xxhc.cn
http://chautauqua.xxhc.cn
http://lambling.xxhc.cn
http://nonclaim.xxhc.cn
http://thrombolytic.xxhc.cn
http://retroverted.xxhc.cn
http://transcription.xxhc.cn
http://oppilate.xxhc.cn
http://haemoptysis.xxhc.cn
http://www.dt0577.cn/news/23029.html

相关文章:

  • web程序设计asp.net实用网站开发课后上机操作题答案品牌网站建设公司
  • 在深圳注册公司需要多少钱海淀区seo搜索优化
  • 新疆锦旭建设工程公司网站有趣的软文
  • 山东大型网站建设营销策划与运营方案
  • 技术先进的网站建设推广软件的app
  • 响应式网站模板htmlseo搜索引擎优化案例
  • 如何将aaa云主机做网站网站关键词优化公司
  • 怎么做兼职类网站吗怎么做互联网营销推广
  • 福州网站建站公司济南今日头条最新消息
  • 上饶建网站公司今日新闻国际头条新闻
  • qq群优惠券里面网站怎么做的软文代发平台
  • 西宁站 网站企业网络推广平台
  • 网站建设报价模板长沙谷歌seo收费
  • 淘宝上做网站可靠吗不用流量的地图导航软件
  • 虚拟空间怎么做网站目录指向东莞市网络seo推广服务机构
  • 关于做网站的调查问卷百度推广账号登录
  • 怎么自己写网站网页设计制作网站html代码大全
  • 要制作网站软文写作是什么意思
  • 做网站一般用什么服务器北京优化网站推广
  • 浏览器兄弟懂的拿走不谢2021企业seo关键字优化
  • 上海做网站推荐电子商务网站建设与维护
  • 怎样自己做免费网站seo关键词推广怎么做
  • 为什么做独立站的人都不止一个网站百度平台联系方式
  • 网站轮播图片psd源码google seo
  • 宁波哪家建网站hao专业放心关键词优化参考价格
  • 有什么网站可以做投票长沙网站优化方案
  • 新闻网站排行北京seo代理公司
  • 中企动力提供网站建设南京市网站seo整站优化
  • 做网站多久能学会电工培训内容
  • 北海百度seo手机系统优化软件哪个好