Domain does not route to service

(I had to change http and https to httpX and httpsX because forum will not let me post so many links :slight_smile:)
Adding custom domain to a service does not work for me.
I have a test apache service running:

root@bog2 ~$ rio ps
NAME                 IMAGE       ENDPOINT                                                    PORTS      SCALE     WEIGHT    CREATED             DETAIL
apache               httpd:2.4   httpsX://            80         1         100%      14 minutes ago

I have created the router and registered a domain (it’s a CNAME for same host) for it

rio route add bb to apache
rio domain register router/bb
root@bog2 ~$ rio route  
NAME        URL                                                                  OPTS                            ACTION    TARGET
router/bb,                                   to        apache,port=80

This looks okay but I can only use first domain, not the to access the site. I returns 404 not found. What am I doing wrong?

When I inspect the apache service, it only has endpoints with domain:

rio inspect apache                                                                                                                                                                                   

kind: Service
creationTimestamp: β€œ2020-01-02T14:02:03Z”
generateName: apache-v0
generation: 1
name: apache-v0hbdgb
namespace: default
resourceVersion: β€œ42546”
selfLink: /apis/
uid: cff4bf3e-b43d-4d05-87b2-14ec17b90c11
app: apache
image: httpd:2.4

  • port: 80
    targetPort: 80
    version: v0
  • hostpath: /data/doc
    path: /usr/local/apache2/htdocs
  • httpsX://
  • httpX://
    buildLogToken: q9rrjkmz85b5xqdj5gpfvz4r7tv9sr8tw4m656md979wb67smcc2n7
    computedApp: apache
    computedVersion: v0
    computedWeight: 100
  • lastUpdateTime: β€œ2020-01-02T14:02:03Z”
    status: β€œTrue”
    type: BuildDeployed
  • lastUpdateTime: β€œ2020-01-02T14:02:04Z”
    status: β€œTrue”
    type: ServiceDeployed
  • lastUpdateTime: β€œ2020-01-02T14:02:04Z”
    status: β€œTrue”
    type: ServiceClusterRBAC
    deploymentReady: true
  • httpsX://
  • httpX://
    available: 1