谷姐:我们都是谷歌迷
We are all Google fans

用兰空图床搭设阿里云盘图床-cy71232

Rate this post

我只是一个自己折腾的小白,大佬要是看到我写的直摇头的话请忽略我的方法

直接在兰空图床上设置阿里云盘webdav的话用不了(可以上传,但是在论坛引用地址的话没图片,这是我试的,其他人直接在兰空设置webdav能直接用的话当我没说,我水平有限),所以先挂载为本地硬盘就行。

一、在服务器上搭设docker版阿里云盘webdav
docker run -d --name=aliyundrive-webdav --restart=unless-stopped -p 8080:8080 \
-v /etc/aliyundrive-webdav/:/etc/aliyundrive-webdav/ \
-e REFRESH_TOKEN='your refresh token' \
-e WEBDAV_AUTH_USER=admin \
-e WEBDAV_AUTH_PASSWORD=admin \
messense/aliyundrive-webdav

二、安装rclone
curl https://rclone.org/install.sh | sudo bash

三、配置rclone
root@truenas[~]# rclone config
2022/01/18 14:12:40 NOTICE: Config file "/root/.config/rclone/rclone.conf" not found - using defaults
No remotes found - make a new one
n) New remote
s) Set configuration password
q) Quit config
n/s/q> n
name> aliyundriver
Option Storage.
Type of storage to configure.
Enter a string value. Press Enter for the default ("").
Choose a number from below, or type in your own value.
39 / Uptobox
\ "uptobox"
40 / Webdav
\ "webdav"
41 / Yandex Disk
\ "yandex"
Storage> 40
Option url.
URL of http host to connect to.
E.g. https://example.com.
Enter a string value. Press Enter for the default ("").
url> http://10.0.0.10:8080/ #阿里云盘webdav地址,就是你的服务器的地址+端口
Option vendor.
Name of the Webdav site/service/software you are using.
Enter a string value. Press Enter for the default ("").
Choose a number from below, or type in your own value.
1 / Nextcloud
\ "nextcloud"
2 / Owncloud
\ "owncloud"
3 / Sharepoint Online, authenticated by Microsoft account
\ "sharepoint"
4 / Sharepoint with NTLM authentication, usually self-hosted or on-premises
\ "sharepoint-ntlm"
5 / Other site/service or software
\ "other"
vendor> 5
Option user.
User name.
In case NTLM authentication is used, the username should be in the format 'Domain\User'.
Enter a string value. Press Enter for the default ("").
user> admin
Option pass.
Password.
Choose an alternative below. Press Enter for the default (n).
y) Yes type in my own password
g) Generate random password
n) No leave this optional password blank (default)
y/g/n> y
Enter the password:
password: #用户名账号和密码我自己是设置的和webdav一样的,也许可以随便设置,我没尝试
Confirm the password:
password:
Option bearer_token.
Bearer token instead of user/pass (e.g. a Macaroon).
Enter a string value. Press Enter for the default ("").
bearer_token>
Edit advanced config?
y) Yes
n) No (default)
y/n> n
--------------------
[alidriver]type = webdav
url = http://10.0.0.10:8880/
vendor = other
user = admin
pass = *** ENCRYPTED ***
--------------------
y) Yes this is OK (default)
e) Edit this remote
d) Delete this remote
y/e/d> y
Current remotes:
Name Type
==== ====
aliyundriver webdav #记住你设置的name
e) Edit existing remote
n) New remote
d) Delete remote
r) Rename remote
c)remote
s) Set configuration password
q) Quit config
e/n/d/r/c/s/q> q

四、挂载
1、建立目录
mkdir /mnt系统没mnt目录就先建立
mkdir /mnt/aliyundriver一步一步来

2、创建挂载点
rclone mount rclone配置文件name:目录 /mnt/aliyundriver --cache-dir /tmp --allow-other --vfs-cache-mode writes --allow-non-empty &
所以我的是
rclone mount aliyundriver:/ /mnt/aliyundriver --cache-dir /tmp --allow-other --vfs-cache-mode writes --allow-non-empty &

这样就挂载到服务器成为本地硬盘了。

五、nginx设置
编辑/www/server/nginx/conf/nginx.conf文件
server项添加
location /tu {
root/mnt/aliyundriver/图床;#定义服务器的默认网站根目录位置
index index.html index.php index.htm;#定义首页索引文件的名称

/tu 是兰空图床访问网址的根路径,根据自己修改,兰空设置与这里一样就行

六、设置兰空图床存储策略

热议
推荐楼 糟糕的鲍勃 4小时前

看到这么多字我就知道这篇帖子与我无关了

3楼 秋月春风 4小时前

不错,回头试试

4楼 tengxunkuku 4小时前

……

5楼 pxy185 4小时前

一看就很牛逼。我不会

6楼 谁说的 3小时前

我也不会

7楼 mgwx 3小时前

我干过 甚至建站都试过 卡的一批 不仅有防盗链而去还封号

8楼 Rece 2小时前

阿里云盘请求量大了直接封号的

9楼 ROYWANG 1小时前

不怕封号的嘛

申明:本文内容由网友收集分享,仅供学习参考使用。如文中内容侵犯到您的利益,请在文章下方留言,本站会第一时间进行处理。

未经谷姐允许不得转载:谷姐靓号网 » 用兰空图床搭设阿里云盘图床-cy71232
分享到: 生成海报

热门文章

评论 抢沙发

评论前必须登录!

立即登录   注册

买Google Voice认准【谷姐靓号网】

Google Voice靓号列表Google Voice自助购买
切换注册

登录

忘记密码 ?

切换登录

注册

我们将发送一封验证邮件至你的邮箱, 请正确填写以完成账号注册和激活