Caddy一个强大的ApiServer,一键Https,反向代理服务器官网:https://caddyserver.com/docsApiServer创建文件Caddyfile运行命令caddystart提示安装证书允许或拒绝(一键Https)打开浏览器https:localhost或http:localhostadminapihttp://localhost:2019localhost{respond"Hello,world!"}文件服务器包含encodezstdgziptemplates如下,可以解析html模板file_server中的一些语法打开fileserverlocalhost{encodezstdgziptemplatesfile_serverbrowse}打开文件服务器打开文件服务器到80端口8080端口访问helloreturnstring8081反向代理8080端口8082onlyopenhttp8083onlyopenhttpslocalhost{encodezstdgziptemplatesfile_serverbrowse}localhost:8080{respond/health-check200respond/hello"Hello,world!8080"200}localhost:8081{reverse_proxyhttps://localhost:8080}http://localhost:8082{reverse_proxyhttps://localhost:8080}https://localhost:8083{reverse_proxyhttps://localhost:8080}如何在自己的服务器上安装Httpsyuminstallyum-plugin-copryumcoprenable@caddy/caddyyuminstallcaddytouchCaddyfilevimCaddyfile6.baidu.com{respond"你好,world!"}caddystart是如此简单y更多内容请阅读官方文档https://caddyserver.com/docs
