Ruby 大佬们帮忙看看这个怎么回事可以吗

chuxingran · 2021年04月09日 · 最后由 chuxingran 回复于 2021年04月16日 · 1612 次阅读
homeland_caddy | {"level":"info","ts":1617880993.4312115,"msg":"using provided configuration","config_file":"/etc/caddy/Caddyfile","config_adapter":""}
homeland_caddy | {"level":"info","ts":1617880993.4378781,"logger":"admin","msg":"admin endpoint started","address":"tcp/localhost:2019","enforce_origin":false,"origins":["localhost:2019","[::1]:2019","127.0.0.1:2019"]}
homeland_caddy | {"level":"info","ts":1617880993.4382145,"logger":"http","msg":"server is listening only on the HTTPS port but has no TLS connection policies; adding one to enable TLS","server_name":"srv0","https_port":443}
homeland_caddy | {"level":"info","ts":1617880993.4382904,"logger":"http","msg":"enabling automatic HTTP->HTTPS redirects","server_name":"srv0"}
homeland_caddy | {"level":"info","ts":1617880993.4391146,"logger":"http","msg":"enabling automatic TLS certificate management","domains":["kuanshu.net"]}
homeland_caddy | {"level":"info","ts":1617880993.4401343,"msg":"autosaved config","file":"/config/caddy/autosave.json"}
homeland_caddy | {"level":"info","ts":1617880993.4402666,"msg":"serving initial configuration"}
homeland_caddy | {"level":"info","ts":1617880993.4418576,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0xc000251340"}
homeland_caddy | {"level":"info","ts":1617880993.441936,"logger":"tls","msg":"cleaned up storage units"}
homeland_caddy | {"level":"info","ts":1617880993.4421935,"logger":"tls.obtain","msg":"acquiring lock","identifier":"kuanshu.net"}
homeland_caddy | {"level":"info","ts":1617880993.4429295,"logger":"tls.obtain","msg":"lock acquired","identifier":"kuanshu.net"}
homeland_caddy | {"level":"info","ts":1617880994.8046975,"logger":"tls.issuance.acme","msg":"waiting on internal rate limiter","identifiers":["kuanshu.net"]}
homeland_caddy | {"level":"info","ts":1617880994.8048298,"logger":"tls.issuance.acme","msg":"done waiting on internal rate limiter","identifiers":["kuanshu.net"]}
homeland_caddy | {"level":"info","ts":1617880995.1492813,"logger":"tls.issuance.acme.acme_client","msg":"trying to solve challenge","identifier":"kuanshu.net","challenge_type":"http-01","ca":"https://acme-v02.api.letsencrypt.org/directory"}
homeland_caddy | {"level":"info","ts":1617880995.856041,"logger":"tls.issuance.acme","msg":"served key authentication","identifier":"kuanshu.net","challenge":"http-01","remote":"52.28.236.88:40054"}
homeland_caddy | {"level":"info","ts":1617880995.9173753,"logger":"tls.issuance.acme","msg":"served key authentication","identifier":"kuanshu.net","challenge":"http-01","remote":"66.133.109.36:61760"}
homeland_caddy | {"level":"info","ts":1617880995.9485803,"logger":"tls.issuance.acme","msg":"served key authentication","identifier":"kuanshu.net","challenge":"http-01","remote":"3.22.70.135:43376"}
homeland_caddy | {"level":"info","ts":1617880996.2913353,"logger":"tls.issuance.acme","msg":"served key authentication","identifier":"kuanshu.net","challenge":"http-01","remote":"34.211.6.84:58322"}
homeland_caddy | {"level":"info","ts":1617880996.54141,"logger":"tls.issuance.acme.acme_client","msg":"validations succeeded; finalizing order","order":"https://acme-v02.api.letsencrypt.org/acme/order/118465942/8938918553"}
homeland_caddy | {"level":"info","ts":1617880997.8801975,"logger":"tls.issuance.acme.acme_client","msg":"successfully downloaded available certificate chains","count":2,"first_url":"https://acme-v02.api.letsencrypt.org/acme/cert/03e98d41564187818a1f77c7b654889f2dd3"}
homeland_caddy | {"level":"info","ts":1617880997.8806603,"logger":"tls.obtain","msg":"certificate obtained successfully","identifier":"kuanshu.net"}
homeland_caddy | {"level":"info","ts":1617880997.8807354,"logger":"tls.obtain","msg":"releasing lock","identifier":"kuanshu.net"}
homeland_caddy | {"level":"error","ts":1617888054.6466556,"logger":"http.handlers.reverse_proxy","msg":"aborting with incomplete response","error":"http2: stream closed"}

看起来是因为你申请 SSL 用的是 kuanshu.net,但对外绑定,访问用的是 www.kuanshu.net

huacnlee 回复

可是我用别的电脑就可以我的就不行为什么呢

chuxingran 回复

因为 chrome 浏览器的某版本之后 在你只输入 kuanshu.net 的时候 会自动补足 www

jicheng1014 回复

那么怎么才可以补全之后也正常呢

chuxingran 回复

第一种方法:使用通配符证书,同一个证书支持所有子域名。 第二种方法:可以为 www 子域名再申请个证书,然后 www 的访问 redirect 到根域名

修改 homeland-docker 的文件 etc/caddy/Caddyfile,把 第一行 修改一下可以解决

- {$domain}
+ {$domain}, www.{$domain}
huacnlee 回复

那大佬我想问一下有没有办法暂时关闭社区栏目,或者是这个可以隐藏 因为我看之前您回的一个帖子是 2017 年的网址我进不去

社区关不掉的

huacnlee 回复

那隐藏也不可以吗

可以修改 head_html 用 CSS 来隐藏

huacnlee 回复

谢谢嘿嘿嘿😊

huacnlee 回复

这个不行呀 homeland_caddy | {"level":"info","ts":1618226593.5064054,"logger":"tls","msg":"cleaned up storage units"} homeland_caddy | {"level":"info","ts":1618312993.449576,"logger":"tls","msg":"cleaned up storage units"} homeland_caddy | {"level":"error","ts":1618363052.231146,"logger":"http.handlers.reverse_proxy","msg":"aborting with incomplete response","error":"http2: stream closed"} homeland_caddy | {"level":"error","ts":1618363052.2336895,"logger":"http.handlers.reverse_proxy","msg":"aborting with incomplete response","error":"http2: stream closed"} homeland_caddy | {"level":"error","ts":1618363052.2387388,"logger":"http.handlers.reverse_proxy","msg":"aborting with incomplete response","error":"http2: stream closed"} homeland_caddy | {"level":"error","ts":1618363052.2412224,"logger":"http.handlers.reverse_proxy","msg":"aborting with incomplete response","error":"http2: stream closed"} homeland_caddy | {"level":"error","ts":1618363052.2569761,"logger":"http.handlers.reverse_proxy","msg":"aborting with incomplete response","error":"http2: stream closed"} homeland_caddy | {"level":"info","ts":1618399393.4424648,"logger":"tls","msg":"cleaned up storage units"} homeland_caddy | {"level":"info","ts":1618442594.0862756,"logger":"tls.cache.maintenance","msg":"advancing OCSP staple","identifiers":["kuanshu.net"],"from":1618743600,"to":1619002800} homeland_caddy | {"level":"info","ts":1618485793.44172,"logger":"tls","msg":"cleaned up storage units"} homeland_caddy | {"level":"error","ts":1618535959.221177,"logger":"http.handlers.reverse_proxy","msg":"aborting with incomplete response","error":"http2: stream closed"}

需要 登录 后方可回复, 如果你还没有账号请 注册新账号