Closed sahara101 closed 1 year ago
Hi there! Sorry I am totally new to this and I can't add a docker to tour plugin...
First things first. If I do not have traefic pilot, I assume I have to use the local configuration?
Here my issue: invalid middleware "my-traefik-plugin-geoblock@file" configuration: invalid middleware type or middleware does not exist
Here the config:
docker-to-be-added:
labels:
- traefik.enable: true - traefik.http.routers.files.entryPoints: https - traefik.http.routers.files.rule: Host(`files.xx.duckdns.org`) - traefik.http.routers.files.middlewares: my-traefik-plugin-geoblock@file
traefik volumes:
- /volume1/docker/security/traefik/:/etc/traefik/ - /var/log/crowdsec/:/var/log/crowdsec/ - /volume1/docker/security/traefik/plugins:/plugins-local
traefik.yml (added at the end of the file):
experimental: localPlugins: traefik-plugin-geoblock: moduleName: github.com/nscuro/traefik-plugin-geoblock
dynamic file:
my-traefik-plugin-geoblock: plugin: traefik-plugin-geoblock: enabled: "true" # Path to ip2location database file databaseFilePath: /plugins-local/traefik-plugin-geoblock/IP2LOCATION-LITE-DB1.IPV6.BIN # Whitelist of countries to allow (ISO 3166-1 alpha-2) allowedCountries: [ "RO", "DE" ] # Allow requests from private / internal networks? allowPrivate: true # HTTP status code to return for disallowed requests (default: 403) disallowedStatusCode: 204
Thanks!
Ok i changed it to experimental: plugins:
and now the error is no more.
I am receiving only a white age over 4G, but maybe I have the DB wrongly configured.
Solved
Hi there! Sorry I am totally new to this and I can't add a docker to tour plugin...
First things first. If I do not have traefic pilot, I assume I have to use the local configuration?
Here my issue: invalid middleware "my-traefik-plugin-geoblock@file" configuration: invalid middleware type or middleware does not exist
Here the config:
docker-to-be-added:
labels:
traefik volumes:
traefik.yml (added at the end of the file):
experimental: localPlugins: traefik-plugin-geoblock: moduleName: github.com/nscuro/traefik-plugin-geoblock
dynamic file:
Thanks!