1. Output of caddy version
:
v2.6.1 h1:EDqo59TyYWhXQnfde93Mmv4FJfYe00dO60zMiEt+pzo=
2. How I run Caddy:
a. System environment:
Docker on Ubuntu Server 20.04
b. Command:
docker-compose up -d
c. Service/unit/compose file:
version: "3"
services:
caddy:
image: caddy
container_name: caddy
restart: unless-stopped
ports:
- "80:80"
- "443:443"
- "8448:8448"
- "9001:9001"
environment:
- MY_DOMAIN
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile:ro
- ./data:/data
- ./config:/config
networks:
default:
external:
name: $DEFAULT_NETWORK
d. My complete Caddy config:
#{
# debug
# acme_ca https://acme-staging-v02.api.letsencrypt.org/directory
#}
(vpn_snippet) {
@vpn {
remote_ip forwarded 172.22.0.1
}
}
internal.{$MY_DOMAIN} {
import vpn_snippet
handle @vpn {
reverse_proxy wordpress:80
}
respond "<center><h1>No Access without VPN!</h1><br>Contact the administrator for more information</center>" 403
}
3. The problem I’m having:
Up until some time ago (I guess some update) it was possible to serve a very simple html site using the respond directive. I just noticed now that this solution makes the web browser show the html code without “interpreting” it. What is the way to go now to server simple sites like this?
4. Error messages and/or full log output:
no relevant logs