admin管理员组

文章数量:1124694

I am trying to use caddy to serve some static files for a local development API

my compose file:

services:
  caddy:
    container_name: caddy_api
    image: caddy
    restart: unless-stopped
    ports:
      - "443:443"
      - "8000:80"
    volumes:
      - ./www:/var/www/app
      - ./Caddyfile:/etc/caddy/Caddyfile
    logging:
      driver: "json-file"
      options:
        max-size: "500m"
        max-file: "2"

when I query the container I can see my files:

docker exec -ti caddy_api ls /var/www/app;
api         client.js   index.html

my caddyfile:

dev.lan {
  tls internal
  root * /var/www/app;
  file_server
}

When I access the I get a blank page but html is not loaded, there is no error message so the connection is happening (I can see the TLS certificate); just not loading the index.html file

本文标签: caddyfileCaddy not serving html indexStack Overflow