When I attempt to access my local web server through a Cloudflare tunnel, it does not work because Cloudflare attempts to access my local (origin) service on port 8080, when in fact it is running in port 80.
2023-01-22T15:31:26Z ERR Request failed error="Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: dial tcp [::1]:8080: connect: connection refused" connIndex=1 dest=https://macmini.mydomain.com/index.html ip=198.41.200.23 type=http
I can see in the tunnel output that it cannot reach the origin service at [::1]:8080. I want it to be trying at port 80 instead. If I configure Apache to listen on port 8080 (which I don’t want to do), all is well.
How I can I configure the tunnel so that it looks for my local (origin) service on port 80?
Might be your config.yml file is in wrong user directory.
Had the same issue recently at school.
I think it’s default set to 8080 somehow
That way, I figured it out and fixed it by creating the .cloudflared directory and copy-paste config.yml inside my “local” user, instead of the “root”.
However, on other device, it works pretty fine at “root”.
$ cloudflared tunnel --config ~/.cloudflared/config.yml run <my-tunnel-name>
... <snip!> ...
2023-01-25T20:40:45Z ERR error="Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: dial tcp [::1]:8080: connect: connection refused" cfRay=78f3d364db9f0cc1-EWR originService=http://localhost:8080