# 404 issue with a non standard HTTP service

**URL:** <https://community.traefik.io/t/404-issue-with-a-non-standard-http-service/6724>\
**Category:** Traefik v2\
**Tags:** docker-swarm\
**Created:** [July 1, 2020, 12:02pm UTC](https://community.traefik.io/t/404-issue-with-a-non-standard-http-service/6724 "2020-07-01T12:02:45Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![remyd1](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/remyd1/32/2256_2.png) [@remyd1](https://community.traefik.io/u/remyd1)\
**Post date:** [July 3, 2020, 1:28pm UTC](https://community.traefik.io/t/404-issue-with-a-non-standard-http-service/6724/5 "2020-07-03T13:28:51Z")

</div>

Ok.

After digging into traefik logs, it seems that I was not using the right syntax for stickiness...

My new `myapp.yml` file:

```auto
version: '3.7'

services:

  myapp:
    image: myapp
    ports:
      - ${MYAPP_PORT?Variable not set}
    deploy:
      mode: replicated
      replicas: 12
      restart_policy:
        condition: on-failure
      labels:
        - traefik.enable=true # enable traefik
        - traefik.docker.network=traefik-public # put it in the same network as traefik
        - traefik.constraint-label=traefik-public # assign the same label as traefik so it can be discovered
        - traefik.http.routers.idcovserv.rule=Host(`${MYAPP_FQDN?Variable not set}`) # listen to port 80 for request to APP_DOMAIN (use together with the line below)
        - traefik.http.routers.idcovserv.entrypoints=http
        - traefik.http.middlewares.idcovserv.redirectscheme.scheme=https # redirect traffic to https
        - traefik.http.middlewares.idcovserv.redirectscheme.permanent=true # redirect traffic to https
        - traefik.http.routers.idcovserv-secured.rule=Host(`${MYAPP_FQDN?Variable not set}`) # listen to port 443 for request to APP_DOMAIN (use together with the line below)
        - traefik.http.routers.idcovserv-secured.entrypoints=https
        - traefik.http.routers.idcovserv-secured.tls.certresolver=le # use the Let's Encrypt certificate we set up earlier
        - traefik.http.services.idcovserv-secured.loadbalancer.server.port=${MYAPP_PORT?Variable not set} # Ask Traefik to loadbalancing on this port
        - traefik.http.services.idcovserv-secured.loadbalancer.sticky.cookie=true
    networks:
      - back-net
      - traefik-public
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro

networks:
  traefik-public:
    external: true
  back-net:
    external: true

```

Hope it would help other people. And just to clarify, the loadbalancing port on traefik service has nothing to do with the app loadbalancing port.

Thanks.

---

_[View the full topic](https://community.traefik.io/t/404-issue-with-a-non-standard-http-service/6724)._
