1. Output of caddy version
:
v2.4.6 h1:HGkGICFGvyrodcqOOclHKfvJC0qTU7vny/7FhYp9hNw=
2. How I run Caddy:
docker-compse up
a. System environment:
Docker
b. Command:
Paste command here.
c. Service/unit/compose file:
version: "3.7"
services:
# Web proxy for load balancing and SSL termination
caddy:
image: docker.io/caddy:2.4.6
restart: unless-stopped
ports:
- "80:80"
- "443:443"
environment:
default_site_port: ""
volumes:
- ../apps/caddy/Caddyfile:/etc/caddy/Caddyfile:ro
- ../../data/caddy:/data
d. My complete Caddy config:
# Global configuration
{
}
# proxy directive snippet (with logging) to be used as follows:
#
# import proxy "containername:port"
(proxy) {
log {
output stdout
format filter {
wrap json
fields {
common_log delete
request>headers delete
resp_headers delete
tls delete
}
}
}
reverse_proxy {args.0} {
header_up X-Forwarded-Port 443
}
}
lms.my_AD_ntwk.local{$default_site_port}, preview.lms.my_AD_ntwk.local{$default_site_port} {
@favicon_matcher {
path_regexp ^/favicon.ico$
}
rewrite @favicon_matcher /theming/asset/images/favicon.ico
# Limit profile image upload size
request_body /api/profile_images/*/*/upload {
max_size 1MB
}
request_body {
max_size 4MB
}
import proxy "lms:8000"
}
studio.lms.my_AD_ntwk.local{$default_site_port} {
@favicon_matcher {
path_regexp ^/favicon.ico$
}
rewrite @favicon_matcher /theming/asset/images/favicon.ico
request_body {
max_size 250MB
}
import proxy "cms:8000"
}
mobile.lms.my_AD_ntwk.local{$default_site_port} {
import proxy "android-app:8000"
}
# Notes
notes.lms.my_AD_ntwk.local{$default_site_port} {
import proxy "notes:8000"
}
3. The problem I’m having:
I am trying to setup LMS platform (openedx via tutor) on our local DNS server(.local) and this works like a charm. But now I want to enable HTTPS, So that I can make the LMS portal be accessed securely across my local AD network. I need help in setting up procedure to generate certificate & configure caddy manually so that my https works.
These are the certificate certificates I have got from the network team:
root.cer
Intermediate.cer
distribution.cer
that I can reach my local websites/servers (some are running on the docker host 192.168.178.165 and some not) just by typing the url e.g. http://senec.local or http://heimdall.local
4. Error messages and/or full log output:
5. What I already tried:
I am little confused/stuck in the approach on signing certificate process for caddy, any help is much appreciated.
6. Links to relevant resources:
Thanks
Venkat