1. Caddy version (caddy version
):
v2.3.0 h1:fnrqJLa3G5vfxcxmOH/+kJOcunPLhSBnjgIvjXV/QTA=
2. How I run Caddy:
caddy run
a. System environment:
Docker-compose
b. Command:
docker-compose up caddy
c. Service/unit/compose file:
version: "3.3"
services:
redis:
image: redis:alpine
networks:
- shared
mongo:
image: mongo:4.2.11
volumes:
- mongodata:/data/db
ports:
- 127.0.0.1:${VUE_APP_MONGODB_PORT}:27017
networks:
- shared
server:
image: nertivia/server-caddy
env_file: .env
networks:
- shared
client:
image: nertivia/client-caddy
env_file: .env
networks:
- shared
caddy:
image: caddy:alpine
env_file: .env
volumes:
- ./cdn/Caddyfile:/etc/caddy/Caddyfile
- ./cdn/public_html:/srv
- ./cdn/ssl_certs:/root/.caddy
ports:
- 80:80
- 443:443
networks:
- shared
php:
image: php:fpm-alpine
working_dir: /srv
env_file: .env
volumes:
- ./cdn/public_html:/srv
networks:
- shared
image-server:
image: node:lts-alpine
working_dir: /srv/node
command: sh -c "npm i && node app.js"
volumes:
- ./cdn/public_html:/srv
env_file: .env
networks:
- shared
volumes:
mongodata:
networks:
shared:
d. My complete Caddyfile or JSON config:
https://localtest.me {
tls /root/.caddy/localtest.me+1.pem /root/.caddy/localtest.me+1-key.pem
reverse_proxy client:8080
}
https://server.localtest.me {
tls /root/.caddy/localtest.me+1.pem /root/.caddy/localtest.me+1-key.pem
reverse_proxy server:8181
}
https://cdn.localtest.me {
tls /root/.caddy/localtest.me+1.pem /root/.caddy/localtest.me+1-key.pem
encode gzip
php_fastcgi php:9000
file_server
}
3. The problem I’m having:
4. Error messages and/or full log output:
Starting caddy_caddy_1 ... done
Attaching to caddy_caddy_1
caddy_1 | {"level":"info","ts":1610901064.9383345,"msg":"using provided configuration","config_file":"/etc/caddy/Caddyfile","config_adapter":"caddyfile"}
caddy_1 | {"level":"info","ts":1610901064.9404683,"logger":"admin","msg":"admin endpoint started","address":"tcp/localhost:2019","enforce_origin":false,"origins":["localhost:2019","[::1]:2019","127.0.0.1:2019"]}
caddy_1 | {"level":"info","ts":1610901064.9408333,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0xc000449ea0"}
caddy_1 | {"level":"warn","ts":1610901064.9440534,"logger":"tls","msg":"stapling OCSP","error":"no OCSP stapling for [localtest.me *.localtest.me]: no OCSP server specified in certificate"}
caddy_1 | {"level":"info","ts":1610901064.9442084,"logger":"http","msg":"skipping automatic certificate management because one or more matching certificates are already loaded","domain":"server.localtest.me","server_name":"srv0"}
caddy_1 | {"level":"info","ts":1610901064.9442265,"logger":"http","msg":"skipping automatic certificate management because one or more matching certificates are already loaded","domain":"cdn.localtest.me","server_name":"srv0"}
caddy_1 | {"level":"info","ts":1610901064.9442306,"logger":"http","msg":"skipping automatic certificate management because one or more matching certificates are already loaded","domain":"localtest.me","server_name":"srv0"}
caddy_1 | {"level":"info","ts":1610901064.9442337,"logger":"http","msg":"enabling automatic HTTP->HTTPS redirects","server_name":"srv0"}
caddy_1 | {"level":"info","ts":1610901064.9452515,"logger":"tls","msg":"cleaned up storage units"}
caddy_1 | {"level":"info","ts":1610901064.945343,"msg":"autosaved config","file":"/config/caddy/autosave.json"}
caddy_1 | {"level":"info","ts":1610901064.9453528,"msg":"serving initial configuration"}