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

推荐订阅源

S
Secure Thoughts
Security Latest
Security Latest
Simon Willison's Weblog
Simon Willison's Weblog
O
OpenAI News
GbyAI
GbyAI
L
LINUX DO - 最新话题
A
Arctic Wolf
T
Tor Project blog
G
GRAHAM CLULEY
I
InfoQ
博客园_首页
IT之家
IT之家
The Register - Security
The Register - Security
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Proofpoint News Feed
The GitHub Blog
The GitHub Blog
Blog — PlanetScale
Blog — PlanetScale
N
Netflix TechBlog - Medium
K
Kaspersky official blog
博客园 - 三生石上(FineUI控件)
S
SegmentFault 最新的问题
U
Unit 42
PCI Perspectives
PCI Perspectives
量子位
P
Palo Alto Networks Blog
S
Securelist
T
Troy Hunt's Blog
博客园 - 【当耐特】
Recorded Future
Recorded Future
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
S
Security Affairs
Engineering at Meta
Engineering at Meta
T
The Blog of Author Tim Ferriss
博客园 - 聂微东
罗磊的独立博客
N
News and Events Feed by Topic
人人都是产品经理
人人都是产品经理
B
Blog RSS Feed
NISL@THU
NISL@THU
C
Cisco Blogs
T
Threatpost
有赞技术团队
有赞技术团队
Forbes - Security
Forbes - Security
Hugging Face - Blog
Hugging Face - Blog
Last Week in AI
Last Week in AI
T
The Exploit Database - CXSecurity.com
Cloudbric
Cloudbric
Cyberwarzone
Cyberwarzone
Google DeepMind News
Google DeepMind News
C
Cyber Attacks, Cyber Crime and Cyber Security

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,可以在文章下面评论留言。