惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Know Your Adversary
Know Your Adversary
云风的 BLOG
云风的 BLOG
Recent Announcements
Recent Announcements
F
Fortinet All Blogs
B
Blog
罗磊的独立博客
宝玉的分享
宝玉的分享
Vercel News
Vercel News
Martin Fowler
Martin Fowler
N
Netflix TechBlog - Medium
P
Proofpoint News Feed
T
Threatpost
Security Latest
Security Latest
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Stack Overflow Blog
Stack Overflow Blog
I
Intezer
P
Privacy International News Feed
D
Docker
月光博客
月光博客
博客园 - 三生石上(FineUI控件)
M
MIT News - Artificial intelligence
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
L
Lohrmann on Cybersecurity
Google DeepMind News
Google DeepMind News
The Last Watchdog
The Last Watchdog
A
Arctic Wolf
IT之家
IT之家
S
SegmentFault 最新的问题
S
Securelist
博客园 - 叶小钗
N
News and Events Feed by Topic
F
Full Disclosure
Security Archives - TechRepublic
Security Archives - TechRepublic
Engineering at Meta
Engineering at Meta
Hacker News: Ask HN
Hacker News: Ask HN
博客园 - Franky
GbyAI
GbyAI
AI
AI
Y
Y Combinator Blog
WordPress大学
WordPress大学
Latest news
Latest news
Microsoft Security Blog
Microsoft Security Blog
人人都是产品经理
人人都是产品经理
N
News | PayPal Newsroom
The Cloudflare Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
I
InfoQ

Rat's Blog - Caddy

使用Caddy申请免费的Let’s Encrypt泛域名SSL证书 - Rat's Blog Caddy环境下一些Web应用程序的配置参考 - Rat's Blog Caddy环境下WordPress博客伪静态设置 - Rat's Blog 小内存VPS安装Caddy+PHP 7+Sqlite 3环境,并快速搭建Typecho博客 - Rat's Blog Aria2+Caddy+Rclone+GDlist+Aria2Ng+Google Drive一键安装脚本 - Rat's Blog Ghost博客一键安装脚本,使用Caddy作为反向代理,并自动签发SSL证书 - Rat's Blog 利用Caddy快速简单的部署反向代理/镜像,自动签发SSL证书 - Rat's Blog 利用Caddy快速搭建Aria2控制前端webui-aria2或者AriaNg - Rat's Blog Caddy Web Server一键管理(开始/停止/安装/更新/卸载)脚本 - Rat's Blog
Linux VPS使用Python/Caddy快速搭建文件分享平台 - Rat's Blog
博主: Rat's · 2018-03-08 · via Rat's Blog - Caddy

说明:刚刚提到过Linux VPS快速分享文件方法,查看:Transfer.sh:Linux VPS使用命令行快速的分享文件,除了这个方法,我们还可以自建文件分享平台,由于Python内置了一个简单的HTTP服务器,而Caddy也是一个简单的HTTP服务器,所以这里可以分别使用PythonCaddy搭建文件分享平台。

Python

使用Python搭建是超级快的,就是界面有点不好看。

使用命令:

#进入要分享的文件目录
cd /moerats
#后面的端口随便填,注意防火墙设置
python -m SimpleHTTPServer 8080

建议配合screen一起使用,参考:使用screen来实现多任务不断线操作命令

然后我们可以打开http://IP:端口进入界面了。
请输入图片描述

Caddy

觉得Python搭建的界面不好看的,可以使用Caddy搭建,这里用的是逗比的脚本。

使用命令:

wget -N --no-check-certificate https://raw.githubusercontent.com/iiiiiii1/doubi/master/caddy_install.sh && chmod +x caddy_install.sh && bash caddy_install.sh
#备用地址
wget -N --no-check-certificate https://www.moerats.com/usr/shell/Caddy/caddy_install.sh && chmod +x caddy_install.sh && bash caddy_install.sh

创建IP访问,使用命令:

#以下一整条命令,直接复制即可,80为端口,可以随便修改,且/MOERATS为要分享的文件目录
echo ":80 {
 root /MOERATS
 gzip
 browse
}" > /usr/local/caddy/Caddyfile

然后我们可以打开http://IP:端口进入界面了。
请输入图片描述
如果打不开,重新启动下Caddy即可。

/etc/init.d/caddy start

版权声明:本文为原创文章,版权归 Rat's Blog 所有,转载请注明出处!

本文链接:https://www.moerats.com/archives/533/

如教程需要更新,或者相关链接出现404,可以在文章下面评论留言。