发布日期:2022-06-18 17:01 点击次数:131
Caddy是一个由Go讲话编写的Web处事器软件,不错自动竣事HTTPS部署。
我方的博客想要使用https,懒得去更新文凭,Caddy不错快速处理我的问题。
况兼比拟nginx,Caddy部署起来更通俗,就一个二进制文献;
CaddyFile树立更通俗,许多都是默许树立,а√天堂最新版在线资源唯一凭证我方的情况,添加需要的参数即可。
功能丰富,然则许多我暂时用不到,用到再通过插件的模式添加即可。
关于一个博客诈欺来说竣工够用了。
装置Caddy在CentOS上不错告成使用yum装置的,99精品人妻无码专区在线视频也不错下载对应平台的二进制进行装置。
装置大喊:
yum install yum-plugin-copr -y yum copr enable @caddy/caddy -y yum install caddy -y
树立
树立文献默许是在/etc/caddy/Caddyfile,树立文献唯一修改好我方的域名,淌若需要https告成填写上http://xxx就不错了,root试验我方的网站目次即可。
我的网站是hugo生成的静态站,告成树立目次。
淌若是php不错告成转发的php_fastcgi。
# The Caddyfile is an easy way to configure your Caddy web server. # # Unless the file starts with a global options block, the first # uncommented line is always the address of your site. # # To use your own domain name (with automatic HTTPS), first make # sure your domain's A/AAAA DNS records are properly pointed to # this machine's public IP, then replace ":80" below with your # domain name. www.opcai.top https://www.opcai.top http://opcai.top https://opcai.top { # Set this path to your site's directory. root * /data/webroot # Enable the static file server. file_server # Another common task is to set up a reverse proxy: # reverse_proxy /back/* localhost:8080 # Or serve a PHP site through php-fpm: # php_fastcgi localhost:9000 } # Refer to the Caddy docs for more information: # https://caddyserver.com/docs/caddyfile
处事经管
systemctl enable --now caddy # 初始并设立开机初始 systemctl reload caddy # 重载树立
转头
Caddy还有许多重大的功能,徐徐探索。
Powered by 最近2019中文字幕在线高清 @2013-2022 RSS地图 HTML地图