4

我有一个 Caddy v2 的配置文件,如下所示:

sentry.mydomain.ru {
    reverse_proxy sentry:9000
}

tasks.mydomain.ru {
    reverse_proxy taiga-proxy:80
}

ain.mydomain.ru {
    reverse_proxy ain-frontend:80
}

Caddy 为每个域制作 https,但我只需要为ain.mydomain.ru. 怎么做?

4

2 回答 2

13

http仅当您使用方案为域添加前缀时,Caddy 才会提供 http 流量。

这是修改后的Caddyfile

sentry.mydomain.ru {
    reverse_proxy sentry:9000
}

tasks.mydomain.ru {
    reverse_proxy taiga-proxy:80
}

http://ain.mydomain.ru {
    reverse_proxy ain-frontend:80
}

参考:https ://caddy.community/t/is-there-any-way-to-disable-tls-from-the-caddyfile/8372/2

于 2020-08-28T20:31:59.037 回答
2

domain:80 or ip:80 will help you access your site on http mode. The example below ain.mydomain.ru will be available only on http. Also ensure tls directive is disabled for the domains you want to access via port 80 using http protocol only.

sentry.mydomain.ru {
reverse_proxy sentry:9000
}

tasks.mydomain.ru {
    reverse_proxy taiga-proxy:80
}

ain.mydomain.ru:80 {
    reverse_proxy ain-frontend:80
}
于 2020-10-08T09:51:21.073 回答