web服务器caddy
caddy是go语言开发web服务器,功能强大,二进制分发,便于部署。
目前使用功能:
- log
- gzip
- https
- redir
- basicauth
- proxy
- root
- File Manager
如果需要使用File Manager,下载二进制文件时需要指定下载File Manager插件
官网地址
配置参考
## vue photos app
http://app.gophper.com {
log /opt/logs/app.gophper.com.access.log
gzip
root /home/www-root/app.gophper.com/dist
}
## gitea
git.gophper.com {
log /opt/logs/git.gophper.com.access.log
gzip
tls example@gmail.com
proxy / localhost:8083 {
header_upstream Host {host}
header_upstream X-Real-IP {remote}
header_upstream X-Forwarded-For {remote}
header_upstream X-Forwarded-Proto {scheme}
}
}
## kpass 密码管理
kpass.gophper.com {
log /opt/logs/kpass.gophper.com.access.log
gzip
tls example@gmail.com
proxy / localhost:9988 {
header_upstream Host {host}
header_upstream X-Real-IP {remote}
header_upstream X-Forwarded-For {remote}
header_upstream X-Forwarded-Proto {scheme}
}
}
## blog
gophper.com, www.gophper.com {
log /opt/logs/www.gophper.com.access.log
gzip
tls example@gmail.com
redir https://gophper.com{uri}
}
## book share
book.gophper.com {
log /opt/logs/book.gophper.com.access.log
gzip
tls example@gmail.com
filemanager / {
show /opt/data/book/
allow_new true
allow_edit false
}
}