drwxr-xr-x. 2 me mygrp 4099 Nov 28 15:18 authelia
drwxr-xr-x. 2 me mygrp 54 Nov 29 11:33 traefik
LS-LA /Working_dir /traefik
-rwxrwxrwx. 1 me mygrp 115 Nov 25 11:22 certificates.yml
drwxrwxrwx. 2 me mygrp 87 Nov 25 11:37 certs
LS-LA/Working_dir/traefik/certs
-r--------. 1 me mygrp 1689 Nov 29 11:37 private.pem
-rw-r--r--. 1 me mygrp 1387 Nov 29 11:37 public.crt
cat/working_dir/traefik/certificates.yml
---
tls:
certificates:
- certFile: /etc/traefik/certs/public.crt
keyFile: /etc/traefik/certs/private.pem
cat/working_dir/authelia/configuration.yml
---
###############################################################
# Authelia configuration #
###############################################################
jwt_secret: "p*fsjdkfds7dsf7sdf/&65fdkjdfsjkfj"
default_redirection_url: https://whoami.example.com
server:
host: 0.0.0.0
port: 9091
log:
level: debug
totp:
issuer: authelia.com
authentication_backend:
file:
path: /config/users_database.yml
access_control:
default_policy: deny
rules:
- domain: whoami.example.com
policy: one_factor
- domain: traefik.example.com
policy: one_factor
session:
name: authelia_session
secret: "d667677&&%%$45u3aYKaNVA3YD5677f66ff663yy"
expiration: 3600 # 1 hour
inactivity: 300 # 5 minutes
domain: example.com # Should match whatever your root protected domain is
regulation:
max_retries: 3
find_time: 120
ban_time: 300
storage:
encryption_key: "IF##344rr343WQ%pQ#q5KpkGX!QMcYJab$M2h3344343"
local:
path: /config/db.sqlite3
notifier:
filesystem:
filename: /config/notification.txt
cat/working_dir/authelia/users_database.yml
---
###############################################################
# Users Database #
###############################################################
# This file can be used if you do not have an LDAP set up.
# List of users
users:
authelia:
disabled: false
displayname: "Authelia User"
password: "$6$rounds=50000$Bterte6466464WD8F2q$Zis.ixdg9s/UOJYrs56b5QEZFiZECu0qZVNsIYxBaNJ7ucIL.nlxVCT5tqh8KHG8X4tlwCFm344hth5qRFN/" # yamllint disable-line rule:line-length
email: [email protected]
groups:
- admins
- dev
我做到了:docker compose up -d
当我尝试访问
Https://whoami.example.com或https://traefik.example.com
我在浏览器中获取此消息:
404 page not found
任何想法?我确实在日志文件中找到了一些错误:
docker构成日志traefik
traefik | time="2023-11-30T16:47:49+01:00" level=debug msg="Creating middleware" entryPointName=http middlewareName=traefik-internal-recovery middlewareType=Recovery
traefik | time="2023-11-30T16:47:49+01:00" level=debug msg="No store is defined to add the certificate MIID0TCCArmgAwIBAgIUIwFmQm72aSK0T0owWpF0Bnnt5tgwDQ, it will be added to the default store."
traefik | time="2023-11-30T16:47:49+01:00" level=debug msg="Adding certificate for domain(s) example.com"
traefik | time="2023-11-30T16:47:49+01:00" level=debug msg="No default certificate, fallback to the internal generated certificate" tlsStoreName=default
traefik | time="2023-11-30T16:47:49+01:00" level=debug msg="Added outgoing tracing middleware noop@internal" entryPointName=http routerName=http-to-https@internal middlewareName=tracing middlewareType=TracingForwarder
...
traefik | time="2023-11-30T16:49:07+01:00" level=debug msg="Serving default certificate for request: \"whoami.example.com\""
traefik | time="2023-11-30T16:49:07+01:00" level=debug msg="http: TLS handshake error from 175.20.0.1:58796: remote error: tls: bad certificate"
traefik | time="2023-11-30T16:49:11+01:00" level=debug msg="Serving default certificate for request: \"whoami.example.com\""
traefik | time="2023-11-30T16:58:19+01:00" level=warning msg="Error checking new version: Get \"https://update.traefik.io/repos/traefik/traefik/releases\": dial tcp 13.39.208.199:443: i/o timeout"
default_redirection_url
来解决。您可以通过执行以下操作来确定这是否是问题:
docker logs authelia
在我的案子中,我看到了:
time="2025-02-25T09:59:46-06:00" level=debug msg="Loaded Configuration Sources" files="[/config/configuration.yml]" filters="[template]"
time="2025-02-25T09:59:46-06:00" level=debug msg="Logging Initialized" fields.level=debug file=/var/log/authelia/authelia.log format=text keep_stdout=true
time="2025-02-25T09:59:46-06:00" level=debug msg="Process user information" gid=0 uid=1000
time="2025-02-25T09:59:46-06:00" level=error msg="Configuration: session: option 'cookies' must be configured with the per cookie option 'default_redirection_url' but the global one is configured which is not supported"
特别是,您正在寻找: