I am brand new to traefik (ie. ~1 day).
I have a
- debian 11 LXC (192.168.1.1)
- running the binary (non-docker)
- version 2.10.7/saintmarcelin of traefik (I don't particularly want to use docker unless I absolutely have to).
- The installation is based on this post
I have a (what I think should be) very simple requirement
- routing SNI requests.
- I have a few containers/VMs that run httpd (eg. 192.168.1.198 nginx 1.18)
- for this test, they are all :80, generally nginx
- (sample config at end)
- If that succeeds I will move to the next stage, which would be to create/renew LE certs and redirects to https, where traefik manages all certificates
- I currently CAN just use nginx-ssl with wildcard LE dns-01certs to do this, but I would like to centralise and simplify certs.
My static traefik.yml
global:
sendAnonymousUsage: false
checkNewVersion: false
log:
filePath: "/etc/traefik/applog.log"
format: json
level: "debug"
# Enable traefik ui
api:
dashboard: true
insecure: true
entryPoints:
http:
address: ":80"
providers:
file:
directory: "/etc/traefik/dynamic/"
watch: true
My /etc/traefik/dynamic/test.yml
## Dynamic configuration
http:
routers:
router-domain1:
rule: "Host(`domain1.co.za`)"
service: service-domain1
entryPoints:
- http
services:
service-domain1:
loadBalancer:
servers:
url: "http://192.168.1.198:80"
if /etc/hosts
192.168.1.1 domain1.co.za
goes via traefik machine, any hit to the http://domain1.co.za:80 gives
{"level":"debug","msg":"'500 Internal Server Error' caused by: unsupported protocol scheme \"\"","time":"2023-12-09T19:46:48+02:00"}
if I change /etc/hosts I get the correct page display
192.168.1.198 domain1.co.za
with access.log showing
192.168.1.13 - - [09/Dec/2023:20:11:40 +0200] "GET /index.html HTTP/1.1" 200 893 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Falkon/22.12.1 QtWebEngine/5.15.13 Chrome/87.0.4280.144 Safari/537.36"
nginx config is like so
server {
listen 80;
server_name prinz.co.za;
root /var/www/html/domain1.co.za;
index index.html index.htm index.php;
access_log /var/log/nginx/domain1.co.za-access.log;
error_log /var/log/nginx/domain1.co.za-error.log error;
location / {
try_files $uri $uri/ =404;
# try_files $uri $uri/ /index.php$is_args$args;
}
}
The nginx access.log shows
192.168.1.13 - - [09/Dec/2023:20:08:23 +0200] "GET /favicon.ico HTTP/1.1" 404 188 "http://domain1.co.za/index.html" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Falkon/22.12.1 QtWebEngine/5.15.13 Chrome/87.0.4280.144 Safari/537.36"
The error is the same via FF,LibreWolf,Curl,Falkon,Chromium
Any hints/pointers welcome. Feel free to be blunt - I never take offense