如何将我的Hexo博客成功部署到腾讯云?
- 内容介绍
- 文章标签
- 相关推荐
本文共计476个文字,预计阅读时间需要2分钟。
一. 安装环境推荐购买腾信云的活动优惠轻应用服务器
2C2G配置即可
即可享受我买的45元一年的:
点我购买以下命令在Ubuntu系统上执行,默认安装nginx:apt-get install nginxmkdir /wwwroot/blog生成博客
一.安装环境推荐购买腾讯云活动的轻应用服务器 2C2G 就可以啦,我买的是 45 一年的:点我购买
以下命令默认在 ubuntu 系统上执行
安装 nginx
apt-get install nginx
mkdir /wwwroot/blog
生成博客
hexo deploy
然后把 public 文件夹打包,并上传到服务器上,然后解压博客到 /wwwroot/blog目录下。
└── blog
├── 404.html
├── about
│ └── index.html
├── archives
│ ├── 2022
│ │ ├── 06
│ │ │ └── index.html
│ │ ├── 07
│ │ │ └── index.html
│ │ └── index.html
│ └── index.html
├── index.html
配置 nginx
vim /etc/nginx/conf.d/blog.conf
server {
listen 80;
server_name <配置你的目录>;
root /wwwroot/blog;
error_page 404 = /404.html;
access_log off;
location / {
index index.html;
}
}
保存后执行 nginx -s reload 命令就可以访问啦。
使用腾讯云 CDN console.cloud.tencent.com/cdn
免费证书:console.cloud.tencent.com/ssl
因为是静态博客,默认会全部缓存,所以发布了新博客,或者对博客有了更改,需要刷新才能看到效果:console.cloud.tencent.com/cdn/refresh
目前学习.NET Core 最好的教程 .NET Core 官方教程 ASP.NET Core 官方教程
.NET Core 交流群:923036995欢迎加群交流
如果您认为这篇文章还不错或者有所收获,您可以点击右下角的支持,或请我喝杯咖啡,这将是我继续写作,分享的最大动力!
本文共计476个文字,预计阅读时间需要2分钟。
一. 安装环境推荐购买腾信云的活动优惠轻应用服务器
2C2G配置即可
即可享受我买的45元一年的:
点我购买以下命令在Ubuntu系统上执行,默认安装nginx:apt-get install nginxmkdir /wwwroot/blog生成博客
一.安装环境推荐购买腾讯云活动的轻应用服务器 2C2G 就可以啦,我买的是 45 一年的:点我购买
以下命令默认在 ubuntu 系统上执行
安装 nginx
apt-get install nginx
mkdir /wwwroot/blog
生成博客
hexo deploy
然后把 public 文件夹打包,并上传到服务器上,然后解压博客到 /wwwroot/blog目录下。
└── blog
├── 404.html
├── about
│ └── index.html
├── archives
│ ├── 2022
│ │ ├── 06
│ │ │ └── index.html
│ │ ├── 07
│ │ │ └── index.html
│ │ └── index.html
│ └── index.html
├── index.html
配置 nginx
vim /etc/nginx/conf.d/blog.conf
server {
listen 80;
server_name <配置你的目录>;
root /wwwroot/blog;
error_page 404 = /404.html;
access_log off;
location / {
index index.html;
}
}
保存后执行 nginx -s reload 命令就可以访问啦。
使用腾讯云 CDN console.cloud.tencent.com/cdn
免费证书:console.cloud.tencent.com/ssl
因为是静态博客,默认会全部缓存,所以发布了新博客,或者对博客有了更改,需要刷新才能看到效果:console.cloud.tencent.com/cdn/refresh
目前学习.NET Core 最好的教程 .NET Core 官方教程 ASP.NET Core 官方教程
.NET Core 交流群:923036995欢迎加群交流
如果您认为这篇文章还不错或者有所收获,您可以点击右下角的支持,或请我喝杯咖啡,这将是我继续写作,分享的最大动力!

