我在Caddyfile中的Caddyfile上设置自定义http和https端口时遇到问题,并且无法使用google和stackoverflow找到答案
我可以像这样设置一个自定义的http端口:
http://example.com:2015
但是我不能设置自定义的https端口
http://example.com:2015
https://example.com:2016
as caddy只将第一行读取为有效。
使用https://example.com:2016
启动该文件将尝试将http绑定到已被占用的端口80
我只想将http绑定到端口2015,将https绑定到端口2016
这是我目前的Caddyfile:
http://example.com:2015
https://example.com:2016
gzip
log access.log
basicauth / username password
filemanager / /path {
database dbname.db
no_auth
}
感谢您的宝贵时间:)
发布于 2018-08-11 23:01:08
如果您使用多个主机
http://example.com:2015 {
tls off
gzip
log access.log
basicauth / username password
filemanager / /path {
database dbname.db
no_auth
}
}
https://example.com:2016 {
tls self_signed
gzip
log access.log
basicauth / username password
filemanager / /path {
database dbname.db
no_auth
}
}
如果您希望为Caddys自动HTTPS,您将需要使用443,但如果您想提供自己的证书或self_sign (或我们的域名系统挑战),那么您应该可以。
同样值得一试的https://caddy.community/
https://stackoverflow.com/questions/51764366
复制相似问题