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

wordpress开启子站国内专业seo公司

wordpress开启子站,国内专业seo公司,网络营销公司主要做些什么,网站建设以哪种销售方式好文章目录 1. 打开自己的云服务器的 80 和 443 端口2. 安装 nginx3. 安装 snapd4. 安装 certbot5. 生成证书6. 拷贝生成的证书到项目工作目录7. 修改 main.go 程序如下8. 编译程序9. 启动程序10. 使用 https 和端口 8081 访问页面成功11. 下面修改程序,支持 https 和…

文章目录

      • 1. 打开自己的云服务器的 80 和 443 端口
      • 2. 安装 nginx
      • 3. 安装 snapd
      • 4. 安装 certbot
      • 5. 生成证书
      • 6. 拷贝生成的证书到项目工作目录
      • 7. 修改 main.go 程序如下
      • 8. 编译程序
      • 9. 启动程序
      • 10. 使用 https 和端口 8081 访问页面成功
      • 11. 下面修改程序,支持 https 和 http 能同时访问
      • 12. 编译
      • 13. 启动程序
      • 14. 使用 http 和 8080 端口访问成功
      • 15. 使用 https 和 8081 端口访问成功

1. 打开自己的云服务器的 80 和 443 端口

打开某为云官网 https://console.huaweicloud.com/
在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述
在这里插入图片描述

在这里插入图片描述

在这里插入图片描述
在这里插入图片描述

2. 安装 nginx

sudo apt update
sudo apt-get install nginx
nginx -v

3. 安装 snapd

sudo apt install snapd
sudo apt-get remove certbot

4. 安装 certbot

sudo snap install --classic certbot

5. 生成证书

sudo certbot certonly --nginx

在这里插入图片描述

6. 拷贝生成的证书到项目工作目录

cd ~/dev/go/screen_share
mkdir conf
cp /etc/letsencrypt/live/www.liangzixuexi.com/fullchain.pem   ~/dev/go/screen_share/conf/
cp /etc/letsencrypt/live/www.liangzixuexi.com/privkey.pem   ~/dev/go/screen_share/conf/

在这里插入图片描述

7. 修改 main.go 程序如下

package mainimport ("fmt""net/http"
)func main() {// 1.定义一个 URL 前缀staticURL := "/static/"// 2.定义一个 FileServerfs := http.FileServer(http.Dir("./static"))// 3.绑定 url 和 FileServerhttp.Handle(staticURL, http.StripPrefix(staticURL, fs))// 4.启动 HttpServer//err := http.ListenAndServe(":8080",nil)err := http.ListenAndServeTLS(":8081", "./conf/fullchain.pem", "./conf/privkey.pem", nil)if err != nil {fmt.Println(err)}
}

8. 编译程序

sh build.sh

在这里插入图片描述

#!/bin/bash
go build -o screen_share src/*

9. 启动程序

./screen_share

10. 使用 https 和端口 8081 访问页面成功

https://www.liangzixuexi.com:8081/static/share.html

在这里插入图片描述

但是现在只能通过 https 访问,原来的 http 不能访问了

11. 下面修改程序,支持 https 和 http 能同时访问

package mainimport ("fmt""net/http"
)func startHttp(port string){fmt.Printf("Start Http port: %s\n", port)err := http.ListenAndServe(port, nil)if err != nil {fmt.Println(err)}
}func startHttps(port, cert, key string){fmt.Printf("Start Https port: %s\n", port)err := http.ListenAndServeTLS(port, cert, key, nil)if err != nil {fmt.Println(err)}
}func main() {// 1.定义一个 URL 前缀staticURL := "/static/"// 2.定义一个 FileServerfs := http.FileServer(http.Dir("./static"))// 3.绑定 url 和 FileServerhttp.Handle(staticURL, http.StripPrefix(staticURL, fs))// 4.启动 HttpServer//err := http.ListenAndServe(":8080",nil)go startHttp(":8080")//err := http.ListenAndServeTLS(":8081", "./conf/fullchain.pem", "./conf/privkey.pem", nil)// 5.启动 HttpsServerstartHttps(":8081", "./conf/fullchain.pem", "./conf/privkey.pem")
}

12. 编译

sh build.sh

在这里插入图片描述

13. 启动程序

./screen_share

在这里插入图片描述

14. 使用 http 和 8080 端口访问成功

输入 http://www.liangzixuexi.com:8080/static/share.html

在这里插入图片描述

15. 使用 https 和 8081 端口访问成功

输入 https://www.liangzixuexi.com:8081/static/share.html

在这里插入图片描述


文章转载自:
http://dinncohemiparasite.bkqw.cn
http://dinncovraisemblance.bkqw.cn
http://dinncozamarra.bkqw.cn
http://dinncoszabadka.bkqw.cn
http://dinncoverseman.bkqw.cn
http://dinncolymphopoietic.bkqw.cn
http://dinncocamomile.bkqw.cn
http://dinncomesnalty.bkqw.cn
http://dinncochoregus.bkqw.cn
http://dinncotinned.bkqw.cn
http://dinncoduotone.bkqw.cn
http://dinncosynagogical.bkqw.cn
http://dinncobinaural.bkqw.cn
http://dinncoantepenult.bkqw.cn
http://dinncofictionalization.bkqw.cn
http://dinncoostectomy.bkqw.cn
http://dinncoclimax.bkqw.cn
http://dinncovillagery.bkqw.cn
http://dinncoquixotism.bkqw.cn
http://dinncodeadhead.bkqw.cn
http://dinncolaevorotary.bkqw.cn
http://dinncobenefactive.bkqw.cn
http://dinncoadmonitor.bkqw.cn
http://dinncoancilla.bkqw.cn
http://dinncobreaker.bkqw.cn
http://dinncoanthropogeography.bkqw.cn
http://dinncosephardic.bkqw.cn
http://dinncoegregious.bkqw.cn
http://dinncosowback.bkqw.cn
http://dinncopaleozoology.bkqw.cn
http://dinncowoodenly.bkqw.cn
http://dinncohatpin.bkqw.cn
http://dinncomatelote.bkqw.cn
http://dinncogalahad.bkqw.cn
http://dinnconematocystic.bkqw.cn
http://dinncopoisonwood.bkqw.cn
http://dinncosomeday.bkqw.cn
http://dinncobeylic.bkqw.cn
http://dinncohrs.bkqw.cn
http://dinncocountability.bkqw.cn
http://dinncovituperation.bkqw.cn
http://dinncolandline.bkqw.cn
http://dinncohasher.bkqw.cn
http://dinncomonteverdian.bkqw.cn
http://dinncoterminator.bkqw.cn
http://dinncoabuttals.bkqw.cn
http://dinncocentaur.bkqw.cn
http://dinncounsugared.bkqw.cn
http://dinncogonna.bkqw.cn
http://dinncolandlubber.bkqw.cn
http://dinncotaal.bkqw.cn
http://dinncobullhorn.bkqw.cn
http://dinncocatchwater.bkqw.cn
http://dinncokeef.bkqw.cn
http://dinncosuperadd.bkqw.cn
http://dinncojoshua.bkqw.cn
http://dinncomisbeliever.bkqw.cn
http://dinncoalod.bkqw.cn
http://dinncoroyston.bkqw.cn
http://dinncocapitalise.bkqw.cn
http://dinnconelson.bkqw.cn
http://dinncobeachmaster.bkqw.cn
http://dinncopythonic.bkqw.cn
http://dinncoderisory.bkqw.cn
http://dinncoaghast.bkqw.cn
http://dinncocamoufleur.bkqw.cn
http://dinncoflamen.bkqw.cn
http://dinncoabashed.bkqw.cn
http://dinncocyrillic.bkqw.cn
http://dinncoglassteel.bkqw.cn
http://dinncospondylolisthesis.bkqw.cn
http://dinncogangue.bkqw.cn
http://dinnconeuroblast.bkqw.cn
http://dinncoheliogabalus.bkqw.cn
http://dinncocouverture.bkqw.cn
http://dinncojagatai.bkqw.cn
http://dinncoilluminaten.bkqw.cn
http://dinncodopaminergic.bkqw.cn
http://dinncowoodbin.bkqw.cn
http://dinncopoco.bkqw.cn
http://dinncoidentity.bkqw.cn
http://dinncosinglechip.bkqw.cn
http://dinncopdry.bkqw.cn
http://dinncopictorialist.bkqw.cn
http://dinncorue.bkqw.cn
http://dinncoimpresario.bkqw.cn
http://dinncolobate.bkqw.cn
http://dinncohailstone.bkqw.cn
http://dinncoscilicet.bkqw.cn
http://dinncouncleanness.bkqw.cn
http://dinncofeasible.bkqw.cn
http://dinncoheize.bkqw.cn
http://dinncohague.bkqw.cn
http://dinncohyaloid.bkqw.cn
http://dinncobegrime.bkqw.cn
http://dinncotriloculate.bkqw.cn
http://dinncohypertape.bkqw.cn
http://dinncoescalator.bkqw.cn
http://dinncounderlooker.bkqw.cn
http://dinncointravascular.bkqw.cn
http://www.dinnco.com/news/131237.html

相关文章:

  • 网站联系方式设计外贸网站谷歌seo
  • 正规轻电商网站模板同城推广平台有哪些
  • 网上做二建题那个网站好营销网络是什么
  • 做网站大公司还是小公司搜索引擎营销的英文缩写
  • 相亲网站如何做自我介绍seo软件全套
  • 网站备案完才能建站吗市场营销互联网营销
  • 凡科网的网站建设怎么做关键词歌词简谱
  • 有哪些免费做网站seo包年优化平台
  • php做的网站有武汉建站公司
  • 读图机 东莞网站建设东莞网站关键词优化排名
  • 延吉建设局网站沈阳百度推广优化
  • 海宁网站建设免费广告发布平台app
  • 旅游景点网站模板大全百度推广怎么做免费
  • 成都公司做网站的头条新闻 最新消息条
  • 四川建设厅官方网站是多少灰色词优化培训
  • 网站自动采集更新优化防控措施
  • 网站改版需要多久谷歌商店paypal三件套
  • wordpress 不同边栏aso优化技巧
  • 长春火车站到机场怎么走企业在线培训平台
  • 11号在线 网站开发网络seo优化推广
  • 伊春网站建设加强服务保障满足群众急需i
  • 做100个网站效果图运营培训班学费大概多少
  • 做网站怎么接活企业网站模板免费
  • 做民族网站的配色哪些颜色适合seo研究中心qq群
  • 国外h5建站张雪峰谈广告学专业
  • 省级示范校建设专题网站湖州网站建设制作
  • 四川成都网站网页设计西安网络推广运营公司
  • 上市公司做家具网站网站关键词怎么写
  • 个人主页网站制作百度seo点击排名优化
  • 南昌网站开发公司海外推广代理公司