8

威联通使用Typecho搭建博客

 2 years ago
source link: http://blog.devwiki.net/2022/03/24/qnap-install-typecho-blog.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

内网穿透搞好了, 接下来就是迁移博客了. 之前的博客使用 Typecho 搭建的, 浏览其 github 仓库,发现已经支持了 docker 部署.

前提条件: 已经处理好内网穿透, 如未设置好, 可参见:

威联通搭建Frp实现内网穿透 - DevWiki Blog

2. 配置frp客户端

在 frpc.ini 中添加博客域名的配置:

# 配置 HTTP访问
[devwiki_blog]
type = http
# nas 所在的局域网IP
local_ip=192.168.31.137
# 给 typecho 使用的端口
local_port=2080
# 博客地址
custom_domains = blog.devwiki.net

# 配置 HTTPS访问
[devwiki_blog_https]
type = https
custom_domains = blog.devwiki.net
plugin = https2http
plugin_local_addr = 192.168.31.137:2080
# HTTPS 证书相关的配置
plugin_key_path = /frp/ssl/blog.key
plugin_crt_path = /frp/ssl/blog.pem
# 配置重写 header 中 host
plugin_host_header_rewrite = blog.devwiki.net
# 配置转发header
plugin_header_X-From-Where = frp
# 以下两个必须设置, 否则 使用https 访问 typecho 安装会出错
plugin_header_X-FORWARDED-PROTO= https
plugin_header_X-FORWARDED-PORT= 443

3. 安装 typecho

1. 打开 container station -> 创建,搜索 typecho

2. 点击 install, 选择 Apache版本

3. 点击高级设置, 设置端口

4. 点击 shared folder 配置文件夹路径

5. 点击create 开始创建,等待创建完成

注意: 不要点击名称进入详情, 否则会自动停止

4. 安装 typecho

访问配置的域名: https://blog.devwiki.net/install.php 进行安装,

4.1 初始化配置

此处选择 sqlite 数据库, 相对比较简单. 然后下一步

4.2 创建管理员账号

自己设置管理员账号密码及邮箱

然后就可以访问管理后台写博客了~


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK