Loading... 既然搭建了博客,接下来就需求图床了,记录下搭建的过程 首先准备好图床域名并做好dns解析 1、宝塔上新建域名 assets.hdmc.club,数据库mysql php版本7.4 2、删除默认文档后上传图床程序 ``` https://github.com/rodber/chevereto-free/releases/download/1.6.2/1.6.2.zip ``` 3、下载中文版zip上传覆盖原图床程序 ``` https://github.com/keven1024/chevereto-free-multi-language ``` 4、宝塔网站设置伪静态,在网站url重写中选择0,输入以下代码 ``` > location / { if (-f $request_filename/index.html){ rewrite (.*) $1/index.html break; } if (-f $request_filename/index.php){ rewrite (.*) $1/index.php; } if (!-f $request_filename){ rewrite (.*) /index.php; } try_files $uri $uri/ /api.php; } location /admin { try_files $uri /admin/index.php?$args; } ``` 保存 5、打开图床网站,填入数据库信息 6、输入管理员账号信息 7、网站模式选择社区 8、回到宝塔开启ssl及强制https 9、可选:解锁容量限制 /www/server/php/74/etc/php.ini 编辑php.ini文件 Crtl + F 搜索 post_max_size 和 upload_max_filesize 修改成10240M,保存 最后修改:2024 年 09 月 25 日 © 允许规范转载 赞 如果觉得我的文章对你有用,请随意赞赏