I am in the process of converting my setup to using file providers. I managed to get the traefik application working but I am unable to get "authelia" to work. Can someone help me try to figure out where I have gone wrong. The only thing I get is a "404" page.
data/configurations/routers.yml
http:
routers:
traefik:
rule: Host(`monitor.domain.tld`)
entrypoints: https
tls: true
service: api@internal
middlewares:
- basic-auth
- redirect-to-https
- secure-headers
- app-rate-limit
authentication:
rule: Host(`authelia.domain.tld`)
entrypoints: https
tls: true
service: authelia
middlewares:
- redirect-to-https
- forward-auth
http-catchall:
entrypoints: http
service: api@internal
rule: HostRegexp(`{host:.+}`)
middlewares:
- redirect-to-https
data/configurations/services.yml
http:
services:
traefik:
loadbalancer:
servers:
- port: "80"
authelia:
loadbalancer:
servers:
- port: "9091"
data/configurations/middlewares.yml
http:
middlewares:
basic-auth:
basicAuth:
realm: "Traefik2 Basic Auth"
usersFile: "/configurations/.htpasswd"
app-rate-limit:
rateLimit:
average: 30
burst: 20
secure-headers:
headers:
accessControlAllowMethods: ["GET", "OPTIONS", "PUT"]
accessControlMaxAge: 100
hostsProxyHeaders: ["X-Forwarded-Host"]
stsSeconds: 63072000
stsIncludeSubdomains: true
stsPreload: true
forceSTSHeader: true
customFrameOptionsValue: "allow-from https:domain.tld"
contentTypeNosniff: true
browserXssFilter: true
referrerPolicy: "same-origin"
permissionsPolicy: "camera=(), microphone=(), geolocation=(), payment=(), usb=(), vr=()"
customResponseHeaders:
X-Robots-Tag: "none,noarchive,nosnippet,notranslate,noimageindex,"
server: ""
forward-auth:
forwardAuth:
address: "http://authelia:9091/api/verify?rd=https://authelia.domain.tld"
trustForwardHeader: true
authResponseHeaders: ["Remote-User", "Remote-Groups"]
redirect-to-https:
redirectScheme:
scheme: "https"
permanent: true
docker-compose.yml (authelia)
version: '3.8'
services:
authelia:
image: 'authelia/authelia:4.37'
networks:
- t2_proxy
- dbnet
ports:
- '9091:9091'
volumes:
- 'authelia-config:/config'
environment:
- TZ=Europe/Prague
- AUTHELIA_JWT_SECRET_FILE=/run/secrets/authelia_jwt_secret
- AUTHELIA_SESSION_SECRET_FILE=/run/secrets/authelia_session_secret
- AUTHELIA_NOTIFIER_SMTP_PASSWORD_FILE=/run/secrets/authelia_notifier_smtp_password
- AUTHELIA_STORAGE_MYSQL_HOST=mariadb
- AUTHELIA_STORAGE_MYSQL_PORT=3306
- AUTHELIA_STORAGE_MYSQL_PASSWORD_FILE=/run/secrets/authelia_db_password
- AUTHELIA_STORAGE_MYSQL_DATABASE=authelia
- AUTHELIA_STORAGE_MYSQL_USERNAME=authelia
secrets:
- authelia_jwt_secret
- authelia_session_secret
- authelia_notifier_smtp_password
- authelia_db_password
deploy:
volumes:
authelia-config:
driver: local
driver_opts:
o: bind
device: /mnt/data/app-config/authelia
type: none
networks:
t2_proxy:
external: true
dbnet:
external: true
secrets:
authelia_jwt_secret:
external: true
authelia_session_secret:
external: true
authelia_notifier_smtp_password:
external: true
authelia_db_password:
external: true
traefik.yml
api:
dashboard: true
entryPoints:
http:
address: ":80"
https:
address: ":443"
forwardedHeaders:
trustedIPs:
- xxx.xx.48.0/20
- xxx.xx.244.0/22
- xxx.xx.200.0/22
- xxx.xx.4.0/22
- xxx.xxx.64.0/18
- xxx.xx.192.0/18
- xxx.xx.240.0/20
- xxx.xxx.96.0/20
- xxx.xxx.240.0/22
- xxx.xx.128.0/17
- xxx.xx.0.0/15
- xxx.16.0.0/12
- xxx.64.0.0/13
- xxx.0.72.0/22
log:
level: DEBUG
accessLog:
filePath: "/traefik.log"
bufferingSize: 100
filters:
statusCodes:
- "400-499"
providers:
file:
directory: "/data/configurations"
watch: true
certificatesResolvers:
dns-cloudflare:
acme:
email: "$CLOUDFLARE_EMAIL"
storage: "/acme.json"
dnsChallenge:
provider:
- cloudflare
resolvers:
- "1.1.1.1:53"
- "1.0.0.1:53"
delayBeforeCheck: 90