12

I have a config file for Caddy v2 like in below:

sentry.mydomain.ru {
    reverse_proxy sentry:9000
}

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

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

Caddy makes https for every domain but I need to make disable "https" only for ain.mydomain.ru. How to do it?

Konstantin
  • 123
  • 1
  • 1
  • 5

2 Answers2

22

Caddy serves http traffic only if you prefix the domain with http scheme.

Here is the modified 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
}

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

Bless
  • 5,052
  • 2
  • 40
  • 44
3

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
}
navule
  • 3,212
  • 2
  • 36
  • 54