木木

  1. 首页
  2. 技术
  3. 正文

typora自动上传到chevereto

2020年11月29日 156点热度 0人点赞 0条评论

环境搭建

我们首先在wwwroot下建立一个文件夹,作为chevereto的运行地点。

mkdir -p ./wwwroot/img-server

这里的img-server最好和图床域名保持一致,便于后期维护。本文写作方便,后面统一将chevereto的运行文件夹称为img-server。打开chevereto官网,使用以下命令下载安装脚本installer.php,并将installer.php放到刚建好的img-server中。

wget url

下一步我们需要配置nginx,让外界访问图床域名时,nginx能过正确执行installer.php。在nginx/conf/下新建一个配置文件,命名为your-img-domain.conf,粘贴以下内容:

some conf

其实到这里我们已经完成了chevereto运行环境的搭建,只需要重载nginx使配置文件生效即可。

docker exec nginx nginx -s reload

上面命令中第一个nginx是docker容器名称,第二个nginx是容器内程序名称,请根据实际情况调整。

获取Token

我们已经完成了chevereto的安装,下一步是获取图床程序的token,使我们本地电脑能够通过API上传图片。

# 上传测试

锁屏

这样就上传成功了!

标签: chevereto markdown 图床
最后更新:2020年12月8日

木木

Stay hungry. Stay foolish

点赞
< 上一篇

文章评论

取消回复

木木

Stay hungry. Stay foolish

标签聚合
markdown chevereto 图床 lnmp docker

COPYRIGHT © 2020 木木. ALL RIGHTS RESERVED.

THEME KRATOS MADE BY VTROIS