noxma forum

noxma forum description


    Traefik - load balancing

    Share

    Admin
    Admin

    จำนวนข้อความ : 33
    Join date : 09/12/2017

    Traefik - load balancing

    ตั้งหัวข้อ by Admin on Sun Dec 10, 2017 4:08 pm

    ##Configuration##

    graceTimeout = 20
    traefikLogsFile = "/var/log/traefik/traefik.log"
    accessLogsFile = "/var/log/traefik/access.log"
    logLevel = "DEBUG"
    #logLevel = "ERROR"

    defaultEntryPoints = ["http", "https"]

    [web]
    #Port for the status page
    address = ":8888"

    [entryPoints]
     [entryPoints.http]
     address = ":80"
       [entryPoints.http.redirect]
       entryPoint = "https"
     [entryPoints.https]
     address = ":443"
       [entryPoints.https.tls]
    #      [[entryPoints.https.tls.certificates]]
    # #       certFile = "ssl_self/noxma.biz.crt"
    # #       keyFile = "ssl_self/noxma.biz.key"
    #      certFile = "ssl/server.crt"
    #      keyFile = "ssl/server.key"

    [acme]
    email = "test@traefik.io"
    storageFile = "/opt/traefik/acme.json.test"
    #onDemand = true
    #caServer = "https://acme-staging.api.letsencrypt.org/directory"
    entryPoint = "https"
    OnHostRule = true

    [[acme.domains]]
     main = "noxma.biz"
     sans = ["odoo.noxma.biz", "web1.noxma.biz","sentry.noxma.biz","admin.noxma.biz","swuba.noxma.biz"]

    #[[acme.domains]]
    #  main = "odoo.noxma.biz"


    [file]

    # rules
    [backends]
     [backends.backend1]
       [backends.backend1.LoadBalancer]
         method = "drr"
       [backends.backend1.servers.server1]
       url = "http://127.0.0.1:8069"
     [backends.backend2]
       [backends.backend2.LoadBalancer]
         method = "drr"
       [backends.backend2.servers.server1]
       url = "http://127.0.0.1:8080"
     [backends.backend3]
       [backends.backend3.LoadBalancer]
         method = "drr"
       [backends.backend3.servers.server1]
       url = "http://127.0.0.1:9069"
     [backends.backend4]
       [backends.backend4.LoadBalancer]
         method = "drr"
       [backends.backend4.servers.server1]
       url = "http://127.0.0.1:4080"
     [backends.backend5]
       [backends.backend5.LoadBalancer]
         method = "drr"
       [backends.backend5.servers.server1]
       url = "http://127.0.0.1:9000"
     [backends.backend6]
       [backends.backend6.LoadBalancer]
         method = "drr"
       [backends.backend6.servers.server1]
       url = "http://127.0.0.1:8090"


    [frontends]
     [frontends.frontend1]
     backend = "backend1"
     passHostHeader = true
       [frontends.frontend1.routes.swu_odoo]
       rule = "Host:swuba.noxma.biz"
     [frontends.frontend2]
     backend = "backend2"
     passHostHeader = true
       [frontends.frontend2.routes.noxma_web]
       rule = "Host:noxma.biz"
     [frontends.frontend3]
     backend = "backend3"
     passHostHeader = true
       [frontends.frontend3.routes.noxma_odoo]
       rule = "Host:odoo.noxma.biz"
     [frontends.frontend4]
     backend = "backend4"
     passHostHeader = true
       [frontends.frontend4.routes.noxma_webapi]
       rule = "Host:web1.noxma.biz"
     [frontends.frontend5]
     backend = "backend5"
     passHostHeader = true
       [frontends.frontend5.routes.noxma_sentry]
       rule = "Host:sentry.noxma.biz"
     [frontends.frontend6]
     backend = "backend6"
     passHostHeader = true
       [frontends.frontend6.routes.noxma_admin]
       rule = "Host:admin.noxma.biz"

    Admin
    Admin

    จำนวนข้อความ : 33
    Join date : 09/12/2017

    Service : /lib/systemd/system/traefik-server.service

    ตั้งหัวข้อ by Admin on Sun Dec 10, 2017 4:12 pm

    [Unit]
    Description=Traefik service
    Requires=odoo-server.service
    After=multi-user.target odoo-server.service

    [Service]
    Type=simple
    PermissionsStartOnly=true
    SyslogIdentifier=traefik-server
    User=ubuntu
    Group=root
    ExecStart=/opt/traefik/run-traefik.sh
    WorkingDirectory=/opt/traefik/

    [Install]
    WantedBy=multi-user.target

      เวลาขณะนี้ Mon Dec 17, 2018 8:27 am