tomMoulard / traefik-plugin-waeb

A web server for Traefik

Home Page:https://plugins.traefik.io/plugins/646b2816a8eb44f98ba6a325/waeb

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Waeb

Build Status

Make Traefik a web server !

This is a plugin for Traefik to build a web server as a middleware.

Not the plugin we deserved, but the plugin we needed.

~ @mpl (src)

Just because you can, doesn't mean you should

~ @dtomcej (src)

Usage

Configuration

Here is an example of a file provider dynamic configuration (given here in YAML), where the interesting part is the http.middlewares section:

# Dynamic configuration

http:
  routers:
    my-waeb-router:
      rule: host(`waeb.localhost`)
      service: noop@internal # required
      middlewares:
        - traefik-plugin-waeb

  middlewares:
    traefik-plugin-waeb:
      plugin:
        traefik-plugin-waeb:
          root: "/var/www/html/"

root

The root parameter is the root directory of the web server.

Local test

There is a docker-compose.yml file to test the plugin locally:

docker-compose up -d

Then, you can go to http://waeb.localhost to see the result.

About

A web server for Traefik

https://plugins.traefik.io/plugins/646b2816a8eb44f98ba6a325/waeb

License:MIT License


Languages

Language:Go 84.6%Language:Makefile 15.4%