How to set a second cloudflare tunnel to my subdomain?

Im a fresh Cloudflare user.
Hosting a website from my raspberry pi at \www.mydomain.com" via Cloudflare CLI

Now, I’ve read instructions to set a subdomain |CNAME| that would be \other.mydomain.com|

How can I run a tunnel from another folder to point to that subdomain ?

Ive tried creating a new one specifying |other.mydomain.com| but I got an error.

Would like to run a new tunnel from another folder to make some development tests before I host it on its own domain in the future.

Thanks

I hope I’m replying to the correct question, but there is no need to start a new Tunnel, you can configure multiple origins per Tunnel.

That can be done either via the config file or the UI in the dash if that’s where you have configured it.

To test you can also always run the demo tunnel, with a random URL.

https://try.cloudflare.com

Thanks for the reply. I will investigate further, it wasn’t obvious for me but then probably will just need to add some additional info on the yml file I suppose.

What Im not sure is how the server/folder structure will be then. since one app is in mydomain/ and I run rust http-simple-server there

That’s not what Cloudflare does, nor I can help here, once you have an HTTP server, then point the Tunnel to it.

This page has some example showing multiple hostnames in a single config file.

That’s not what Cloudflare does, nor I can help here, once you have an HTTP server, then point the Tunnel to it.
Sure , I was just thinking out loud.

looks like it should be fine with

ingress:
  - hostname: mydomain.com
    service: http://localhost:8000
  - hostname: other.mydomain.com
    service: http://localhost:8001
  - service: http_status:404

and then running another simple http server on that port

Thanks for the help
``

That should work, from a config perspective.

That worked!

Just had to check the logs between restarts but they are kind enough to explain you that the last rule should have no service name which I ommited as in the example with http_status:404

- hostname: other.mydomain.com
        service: http://localhost:8001
      - service: http://localhost:8000

then started serving in paralell on 8001 and works great