Invalid node rule with TLS settings Nginx/Apache

Hello there.
I have next docker compose:

services:
  website:
    image: "blackyuzia/php-fpm-nginx"
    build:
      context: .
      dockerfile: config/dockerfile # dwchiang/nginx-php-fpm:7.4.33-fpm-bullseye-nginx-1.24.0 with some custom configs
    restart: unless-stopped
    container_name: website
    networks:
      - traefik-vnet
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.php-bans.rule=Host(`sub.domain.com`)"
      - "traefik.http.routers.php-bans.rule.tls=true"
      - "traefik.http.routers.php-bans.rule.tls.certresolver=production"

networks:
  traefik-vnet:
    external: true

After run it, traefik can't apply this service as route due: invalid node rule: string
If I remove this 2 lines:

      - "traefik.http.routers.php-bans.rule.tls=true"
      - "traefik.http.routers.php-bans.rule.tls.certresolver=production"

Traefik will proxy (only on http). Only this one service has this issue. What a reason of this issue and how I could fix it?
Service inside is Nginx (port=80), but with Apache same :thinking:

Traefik: 2.11 (tested on 2.10 & 3.0 too)

Remove .rule. in the two lines.

Check simple Traefik example.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.