OneManager是什么
这是一个使用onedrive api将onedrive目录映射成一个云盘的程序,实现 OneDrive 文件共享的程序,外部下载等功能。类似的程序还有很多,比如OneIndex、Pyone、OnePoint等等。这个程序的特点是支持多种onedrive类型,可以部署在多种平台上。
部署教程
本教程以在Glitch部署为例子.(建议挂梯)
- 打开官网Glitch:https://glitch.com/
- 点击 Log in
![图片[2]-利用 OneManager-php 搭建免费onedrive文件分享站教程-憬瑟流年](https://cdn.bifiv.com/wp-content/uploads/2022/02/1.jpeg?imageMogr2/format/webp/interlace/1/quality/100|watermark/1/image/aHR0cDovL3dhdGVybWFyay1jZC0xMjUyMTA2MjExLnBpY2NkLm15cWNsb3VkLmNvbS9ydmljaC0xMjUyNDQ0NTMzLzE1ODk5MDM0NjIucG5n/gravity/southeast/dx/10/dy/10)
- 通过Github登录等
![图片[3]-利用 OneManager-php 搭建免费onedrive文件分享站教程-憬瑟流年](https://cdn.bifiv.com/wp-content/uploads/2022/02/2.jpeg?imageMogr2/format/webp/interlace/1/quality/100|watermark/1/image/aHR0cDovL3dhdGVybWFyay1jZC0xMjUyMTA2MjExLnBpY2NkLm15cWNsb3VkLmNvbS9ydmljaC0xMjUyNDQ0NTMzLzE1ODk5MDM0NjIucG5n/gravity/southeast/dx/10/dy/10)
- 新建一个项目
![图片[4]-利用 OneManager-php 搭建免费onedrive文件分享站教程-憬瑟流年](https://cdn.bifiv.com/wp-content/uploads/2022/02/3.jpeg?imageMogr2/format/webp/interlace/1/quality/100|watermark/1/image/aHR0cDovL3dhdGVybWFyay1jZC0xMjUyMTA2MjExLnBpY2NkLm15cWNsb3VkLmNvbS9ydmljaC0xMjUyNDQ0NTMzLzE1ODk5MDM0NjIucG5n/gravity/southeast/dx/10/dy/10)
- 选择Import from Github
![图片[5]-利用 OneManager-php 搭建免费onedrive文件分享站教程-憬瑟流年](https://cdn.bifiv.com/wp-content/uploads/2022/02/4.jpeg?imageMogr2/format/webp/interlace/1/quality/100|watermark/1/image/aHR0cDovL3dhdGVybWFyay1jZC0xMjUyMTA2MjExLnBpY2NkLm15cWNsb3VkLmNvbS9ydmljaC0xMjUyNDQ0NTMzLzE1ODk5MDM0NjIucG5n/gravity/southeast/dx/10/dy/10)
- 在弹出的对话框中输入 https://github.com/qkqpttgf/OneManager-php, 然后点击确定.
![图片[6]-利用 OneManager-php 搭建免费onedrive文件分享站教程-憬瑟流年](https://cdn.bifiv.com/wp-content/uploads/2022/02/5.jpeg?imageMogr2/format/webp/interlace/1/quality/100|watermark/1/image/aHR0cDovL3dhdGVybWFyay1jZC0xMjUyMTA2MjExLnBpY2NkLm15cWNsb3VkLmNvbS9ydmljaC0xMjUyNDQ0NTMzLzE1ODk5MDM0NjIucG5n/gravity/southeast/dx/10/dy/10)
- 接下来Glitch将会为你导入该项目, 这可能会需要一点时间.
![图片[7]-利用 OneManager-php 搭建免费onedrive文件分享站教程-憬瑟流年](https://cdn.bifiv.com/wp-content/uploads/2022/02/6.jpeg?imageMogr2/format/webp/interlace/1/quality/100|watermark/1/image/aHR0cDovL3dhdGVybWFyay1jZC0xMjUyMTA2MjExLnBpY2NkLm15cWNsb3VkLmNvbS9ydmljaC0xMjUyNDQ0NTMzLzE1ODk5MDM0NjIucG5n/gravity/southeast/dx/10/dy/10)
- 会打开一个新的页面:
![图片[8]-利用 OneManager-php 搭建免费onedrive文件分享站教程-憬瑟流年](https://cdn.bifiv.com/wp-content/uploads/2022/02/7.jpeg?imageMogr2/format/webp/interlace/1/quality/100|watermark/1/image/aHR0cDovL3dhdGVybWFyay1jZC0xMjUyMTA2MjExLnBpY2NkLm15cWNsb3VkLmNvbS9ydmljaC0xMjUyNDQ0NTMzLzE1ODk5MDM0NjIucG5n/gravity/southeast/dx/10/dy/10)
- 然后按照提示往下走,设置好密码后会来到这个界面,点击登录:
![图片[9]-利用 OneManager-php 搭建免费onedrive文件分享站教程-憬瑟流年](https://cdn.bifiv.com/wp-content/uploads/2022/02/8.jpeg?imageMogr2/format/webp/interlace/1/quality/100|watermark/1/image/aHR0cDovL3dhdGVybWFyay1jZC0xMjUyMTA2MjExLnBpY2NkLm15cWNsb3VkLmNvbS9ydmljaC0xMjUyNDQ0NTMzLzE1ODk5MDM0NjIucG5n/gravity/southeast/dx/10/dy/10)
- 输入密码后来到这个界面,点击管理>设置:
![图片[10]-利用 OneManager-php 搭建免费onedrive文件分享站教程-憬瑟流年](https://cdn.bifiv.com/wp-content/uploads/2022/02/9.jpeg?imageMogr2/format/webp/interlace/1/quality/100|watermark/1/image/aHR0cDovL3dhdGVybWFyay1jZC0xMjUyMTA2MjExLnBpY2NkLm15cWNsb3VkLmNvbS9ydmljaC0xMjUyNDQ0NTMzLzE1ODk5MDM0NjIucG5n/gravity/southeast/dx/10/dy/10)
- 点击“添加盘”:
填写标签和显示名称,根据自己的OneDrive账号选择第一或第二个选项:
点击确认,稍等一会即可看到这个界面:
登录你的OneDrive账号,接受许可:
稍等几秒后即可看到这个界面:
到此你的OneManager就算部署成功了.
高级设置
启用https
Glitch默认不会启用https, 你可以在OneManager 的设置 > 平台变量 中将 forceHttps 的值设置为1来启用 https :
自定义域名
在Glitch中,依次点击 Tools > Custom Domains :
输入你的域名, 并点击Add Domain:(我这里的onemanager只是一个示例, 你可以用其他的二级域名)
在你的域名服务供应商中为你的域名添加一条解析:
类型为CNAME, 目标填 glitch.edgeapp.net (如果你在平台变量中开启了https,则不要开启cloudflare的橙色云)。
显示特定文件夹:
在public_path 中填入你想显示的文件夹名称(前面加个斜杆 / ),然后点击设置即可。
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END
暂无评论内容