Argo Tunnel proxying tunnel requests to http://localhost:8080 regardless of yml configuration

I’ve been trying to configure Cloudflare’s Argo Tunnel for quite some time now, and have been waiting over 3 days for Cloudflare Support to respond to the latest on my ticket (when initially they would respond within 4 hours)…

I am able to create successful Argo Tunnel connections without running into errors now… but no matter what combination of settings I try, I cannot get a subdomain of my zone to route to a discernable directory on my server to display the website waiting there… (I get the generic cPanel default page as shown here: https://p01d.keddy.ca/ )

I don’t know if this has anything to do with the fact that no matter what configuration options I set, cloudflared always reports back that it is proxying traffic to http://localhost:8080 (despite the URL setting in my yml config file being vastly different)

Anyone who has any advice to contribute will be greatly appreciated!

I think you have to tunnel to ports, never tried differently.

try creating tunnels from command line:

To begin, run the Tunnel with the following command.

cloudflared tunnel --config path/config.yaml run <NAME>

If you have deleted the cert.pem file, you must specify the UUID instead of the name.

cloudflared tunnel --config path/config.yaml run <UUID>

So unfortunately this reply is not a solution, because it disregards the issues raised in my post. If I have 20-some-odd subdomains I need to configure, how would I “route to ports”? Not only can I not change the local host URL being proxied to (because cloudflared appears to be ignoring my config file), but if I were to follow your answer then I would have to create a new port for each subdomain which makes no sense.

Cloudflared is creating a successful connection so my command is not the issue. My issue is that cloudflared is not respecting the subdomains configured in cpanel, to route the subdomain to the proper folder on the server.

what does your yaml config file contents look like? and the example command used to start the argo tunnel

My config.yml file for keddy.ca looks as follows:

hostname: keddy.ca
url: http://localhost:80
log: /var/log/cloudflared.log

For subdomains of keddy.ca, I’ve also tried:

hostname: p01d.keddy.ca
url: http://localhost:80
log: /var/log/cloudflared-p01d.log

The commands I’ve used for the keddy.ca tunnel are as follows:

cloudflared tunnel create keddyca
cloudflared tunnel route dns keddyca keddy.ca
(cloudflared tunnel --config ~/.cloudflared/config.yml run keddyca &)

…and the commands for subdomains like this:

cloudflared tunnel create p01d
cloudflared tunnel route dns p01d p01d.keddy.ca
(cloudflared tunnel --config ~/.cloudflared/p01d.yml run p01d &)

No matter what configuration I use, after “Starting metrics server on …” I always see an output line that reads “Proxying tunnel requests to http://localhost:8080

I have even run cloudflared service install where allegedly the config file at ~/.cloudflared/config.yml is copied to /etc/cloudflared/config.yml, but the proxying url in the output never matches my config.yml url parameter.

I have at least 20 subdomains of keddy.ca that I will be pointing other Cloudflare accounts to via CNAME (don’t worry I’ve already put the ticket in with Cloudflare to get the limitations lifted as per my Pro Account status)… but I cannot get these subdomains setup on Argo Tunnel so this can be accomplished 100%.

If it is safe to post debug output here publicly, I can post as well.

I would suggest that you read the log first before posting and omit any sensitive information.
What is the cloudflared version you are using?

So I’m currently on Cloudflared version 2020.9.3… Below is debug output from after a successful tunnel is run…

[[email protected] .cloudflared]$ (cloudflared tunnel --url http://0.0.0.0:80 --loglevel debug run p01d &)
DEBUG[2020-10-10T12:43:46-04:00] Reading origin cert from /home/***/.cloudflared/cert.pem
INFO[2020-10-10T12:43:46-04:00] Version 2020.9.3
INFO[2020-10-10T12:43:46-04:00] GOOS: linux, GOVersion: go1.15.2, GoArch: amd64
INFO[2020-10-10T12:43:46-04:00] Environment variables map[proxy-dns-upstream:https://1.1.1.1/dns-query, https://1.0.0.1/dns-query]
INFO[2020-10-10T12:43:46-04:00] cloudflared will not automatically update if installed by a package manager.
INFO[2020-10-10T12:43:46-04:00] Starting metrics server on 127.0.0.1:40374/metrics
INFO[2020-10-10T12:43:46-04:00] Proxying tunnel requests to http://localhost:8080
DEBUG[2020-10-10T12:43:46-04:00] edgediscovery - GetAddr: Giving connection its new address 198.41.200.113:7844: connID: 0
INFO[2020-10-10T12:43:47-04:00] Connection 0 registered with ORD using ID **********
DEBUG[2020-10-10T12:43:47-04:00] edgediscovery - GetDifferentAddr: Giving connection its new address 198.41.192.107:7844: connID: 1
INFO[2020-10-10T12:43:47-04:00] Connection 1 registered with YYZ using ID **********
DEBUG[2020-10-10T12:43:48-04:00] edgediscovery - GetDifferentAddr: Giving connection its new address 198.41.200.53:7844: connID: 2
INFO[2020-10-10T12:43:48-04:00] Connection 2 registered with ORD using ID **********
DEBUG[2020-10-10T12:43:49-04:00] edgediscovery - GetDifferentAddr: Giving connection its new address 198.41.192.47:7844: connID: 3
INFO[2020-10-10T12:43:49-04:00] Connection 3 registered with YYZ using ID **********
DEBUG[2020-10-10T12:47:03-04:00] CF-RAY: **********-ORD GET http://localhost:8080/ HTTP/1.1

then after the successful connection is made, the first time I navigate to that subdomain, I get the following debug output as well…

DEBUG[2020-10-10T12:47:03-04:00] CF-RAY: ***-ORD GET http://localhost:8080/ HTTP/1.1
DEBUG[2020-10-10T12:47:03-04:00] CF-RAY: ***-ORD Request Headers map[Accept:[text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9] Accept-Encoding:[gzip] Accept-Language:[en-US,en;q=0.9] Cdn-Loop:[cloudflare] Cf-Cloudflared-Proxy-Tunnel-Hostname:[***.cfargotunnel.com] Cf-Connecting-Ip:[***.***.***.***] Cf-Ipcountry:[CA] Cf-Ray:[***-ORD] Cf-Request-Id:[***] Cf-Visitor:[{"scheme":"https"}] Cf-Warp-Tag-Id:[***] Cookie:[_ga=***; _fbp=***; hubspotutk=***; messagesUtk=***; __cfduid=***; __hstc=***] Sec-Fetch-Dest:[document] Sec-Fetch-Mode:[navigate] Sec-Fetch-Site:[none] Sec-Fetch-User:[?1] Upgrade-Insecure-Requests:[1] User-Agent:[Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36] X-Forwarded-For:[***.***.***.***] X-Forwarded-Proto:[https]]
DEBUG[2020-10-10T12:47:03-04:00] CF-RAY: ***-ORD Request content length 0
DEBUG[2020-10-10T12:47:03-04:00] CF-RAY: ***-ORD 200 OK
DEBUG[2020-10-10T12:47:03-04:00] CF-RAY: ***-ORD Response Headers map[Accept-Ranges:[bytes] Cache-Control:[no-cache, no-store, must-revalidate] Connection:[Upgrade, Keep-Alive] Content-Length:[163] Content-Type:[text/html] Date:[Sat, 10 Oct 2020 16:47:03 GMT] Expires:[0] Keep-Alive:[timeout=5, max=100] Last-Modified:[Mon, 15 Jun 2020 20:20:51 GMT] Pragma:[no-cache] Server:[Apache] Upgrade:[h2,h2c] Vary:[Accept-Encoding]]
DEBUG[2020-10-10T12:47:03-04:00] CF-RAY: ***-ORD Response content length 163
DEBUG[2020-10-10T12:47:04-04:00] CF-RAY: ***-ORD GET http://localhost:8080/cgi-sys/defaultwebpage.cgi HTTP/1.1
DEBUG[2020-10-10T12:47:04-04:00] CF-RAY: ***-ORD Request Headers map[Accept:[text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9] Accept-Encoding:[gzip] Accept-Language:[en-US,en;q=0.9] Cdn-Loop:[cloudflare] Cf-Cloudflared-Proxy-Tunnel-Hostname:[***.cfargotunnel.com] Cf-Connecting-Ip:[***.***.***.***] Cf-Ipcountry:[CA] Cf-Ray:[***-ORD] Cf-Request-Id:[05b501b53700007f8c11b9e200000001] Cf-Visitor:[{"scheme":"https"}] Cf-Warp-Tag-Id:[***] Cookie:[_ga=***; _fbp=***; hubspotutk=***; messagesUtk=***; __cfduid=***; __hstc=***; __cf_bm=***] Referer:[https://p01d.keddy.ca/] Sec-Fetch-Dest:[document] Sec-Fetch-Mode:[navigate] Sec-Fetch-Site:[same-origin] Sec-Fetch-User:[?1] Upgrade-Insecure-Requests:[1] User-Agent:[Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36] X-Forwarded-For:[***.***.***.***] X-Forwarded-Proto:[https]]
DEBUG[2020-10-10T12:47:04-04:00] CF-RAY: ***-ORD Request content length 0
DEBUG[2020-10-10T12:47:04-04:00] CF-RAY: ***-ORD GET http://localhost:8080/favicon.ico HTTP/1.1
DEBUG[2020-10-10T12:47:04-04:00] CF-RAY: ***-ORD Request Headers map[Accept:[image/avif,image/webp,image/apng,image/*,*/*;q=0.8] Accept-Encoding:[gzip] Accept-Language:[en-US,en;q=0.9] Cdn-Loop:[cloudflare] Cf-Cloudflared-Proxy-Tunnel-Hostname:[***.cfargotunnel.com] Cf-Connecting-Ip:[***.***.***.***] Cf-Ipcountry:[CA] Cf-Ray:[***-ORD] Cf-Request-Id:[***] Cf-Visitor:[{"scheme":"https"}] Cf-Warp-Tag-Id:[***] Cookie:[_ga=***; _fbp=***; hubspotutk=***; messagesUtk=***; __cfduid=***; __hstc=***; __cf_bm=***] Referer:[https://p01d.keddy.ca/] Sec-Fetch-Dest:[image] Sec-Fetch-Mode:[no-cors] Sec-Fetch-Site:[same-origin] User-Agent:[Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36] X-Forwarded-For:[***.***.***.***] X-Forwarded-Proto:[https]]
DEBUG[2020-10-10T12:47:04-04:00] CF-RAY: ***-ORD Request content length 0
DEBUG[2020-10-10T12:47:04-04:00] CF-RAY: ***-ORD 404 Not Found
DEBUG[2020-10-10T12:47:04-04:00] CF-RAY: ***-ORD Response Headers map[Accept-Ranges:[bytes] Cache-Control:[no-cache, no-store, must-revalidate] Connection:[Upgrade, Keep-Alive] Content-Type:[text/html] Date:[Sat, 10 Oct 2020 16:47:04 GMT] Expires:[0] Keep-Alive:[timeout=5, max=100] Pragma:[no-cache] Server:[Apache] Upgrade:[h2,h2c] Vary:[Accept-Encoding]]
DEBUG[2020-10-10T12:47:04-04:00] CF-RAY: ***-ORD Response content length unknown
DEBUG[2020-10-10T12:47:04-04:00] CF-RAY: ***-ORD 200 OK
DEBUG[2020-10-10T12:47:04-04:00] CF-RAY: ***-ORD Response Headers map[Connection:[Keep-Alive] Content-Type:[text/html] Date:[Sat, 10 Oct 2020 16:47:04 GMT] Keep-Alive:[timeout=5, max=99] Server:[Apache] Vary:[Accept-Encoding]]
DEBUG[2020-10-10T12:47:04-04:00] CF-RAY: ***-ORD Response content length unknown
DEBUG[2020-10-10T12:47:04-04:00] CF-RAY: ***-ORD GET http://localhost:8080/img-sys/IP_changed.png HTTP/1.1
DEBUG[2020-10-10T12:47:04-04:00] CF-RAY: ***-ORD Request Headers map[Accept:[image/avif,image/webp,image/apng,image/*,*/*;q=0.8] Accept-Encoding:[gzip] Accept-Language:[en-US,en;q=0.9] Cdn-Loop:[cloudflare] Cf-Cloudflared-Proxy-Tunnel-Hostname:[***.cfargotunnel.com] Cf-Connecting-Ip:[***.***.***.***] Cf-Ipcountry:[CA] Cf-Ray:[***-ORD] Cf-Request-Id:[***] Cf-Visitor:[{"scheme":"https"}] Cf-Warp-Tag-Id:[***] Cookie:[_ga=***; _fbp=***; hubspotutk=***; messagesUtk=***; __cfduid=***; __hstc=***; __cf_bm=***] If-Modified-Since:[Tue, 24 Mar 2020 19:39:40 GMT] Referer:[https://p01d.keddy.ca/cgi-sys/defaultwebpage.cgi] Sec-Fetch-Dest:[image] Sec-Fetch-Mode:[no-cors] Sec-Fetch-Site:[same-origin] User-Agent:[Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36] X-Forwarded-For:[***.***.***.***] X-Forwarded-Proto:[https]]
DEBUG[2020-10-10T12:47:04-04:00] CF-RAY: ***-ORD Request content length 0
DEBUG[2020-10-10T12:47:04-04:00] CF-RAY: ***-ORD GET http://localhost:8080/img-sys/server_moved.png HTTP/1.1
DEBUG[2020-10-10T12:47:04-04:00] CF-RAY: ***-ORD Request Headers map[Accept:[image/avif,image/webp,image/apng,image/*,*/*;q=0.8] Accept-Encoding:[gzip] Accept-Language:[en-US,en;q=0.9] Cdn-Loop:[cloudflare] Cf-Cloudflared-Proxy-Tunnel-Hostname:[***.cfargotunnel.com] Cf-Connecting-Ip:[***.***.***.***] Cf-Ipcountry:[CA] Cf-Ray:[***-ORD] Cf-Request-Id:[***] Cf-Visitor:[{"scheme":"https"}] Cf-Warp-Tag-Id:[***] Cookie:[_ga=***; _fbp=***; hubspotutk=***; messagesUtk=***; __cfduid=***; __hstc=***; __cf_bm=***] If-Modified-Since:[Tue, 24 Mar 2020 19:39:40 GMT] Referer:[https://p01d.keddy.ca/cgi-sys/defaultwebpage.cgi] Sec-Fetch-Dest:[image] Sec-Fetch-Mode:[no-cors] Sec-Fetch-Site:[same-origin] User-Agent:[Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36] X-Forwarded-For:[***.***.***.***] X-Forwarded-Proto:[https]]
DEBUG[2020-10-10T12:47:04-04:00] CF-RAY: ***-ORD Request content length 0
DEBUG[2020-10-10T12:47:04-04:00] CF-RAY: ***-ORD 304 Not Modified
DEBUG[2020-10-10T12:47:04-04:00] CF-RAY: ***-ORD Response Headers map[Connection:[Keep-Alive] Date:[Sat, 10 Oct 2020 16:47:04 GMT] Keep-Alive:[timeout=5, max=98] Server:[Apache]]
DEBUG[2020-10-10T12:47:04-04:00] CF-RAY: ***-ORD Response content length 0
DEBUG[2020-10-10T12:47:04-04:00] CF-RAY: ***-ORD GET http://localhost:8080/img-sys/powered_by_cpanel.svg HTTP/1.1
DEBUG[2020-10-10T12:47:04-04:00] CF-RAY: ***-ORD Request Headers map[Accept:[image/avif,image/webp,image/apng,image/*,*/*;q=0.8] Accept-Encoding:[gzip] Accept-Language:[en-US,en;q=0.9] Cdn-Loop:[cloudflare] Cf-Cloudflared-Proxy-Tunnel-Hostname:[***.cfargotunnel.com] Cf-Connecting-Ip:[***.***.***.***] Cf-Ipcountry:[CA] Cf-Ray:[***-ORD] Cf-Request-Id:[***] Cf-Visitor:[{"scheme":"https"}] Cf-Warp-Tag-Id:[***] Cookie:[_ga=***; _fbp=***; hubspotutk=***; messagesUtk=***; __cfduid=***; __hstc=***; __cf_bm=***] If-Modified-Since:[Tue, 24 Mar 2020 19:39:40 GMT] Referer:[https://p01d.keddy.ca/cgi-sys/defaultwebpage.cgi] Sec-Fetch-Dest:[image] Sec-Fetch-Mode:[no-cors] Sec-Fetch-Site:[same-origin] User-Agent:[Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36] X-Forwarded-For:[***.***.***.***] X-Forwarded-Proto:[https]]
DEBUG[2020-10-10T12:47:04-04:00] CF-RAY: ***-ORD Request content length 0
DEBUG[2020-10-10T12:47:04-04:00] CF-RAY: ***-ORD 304 Not Modified
DEBUG[2020-10-10T12:47:04-04:00] CF-RAY: ***-ORD Response Headers map[Connection:[Keep-Alive] Date:[Sat, 10 Oct 2020 16:47:04 GMT] Keep-Alive:[timeout=5, max=99] Server:[Apache]]
DEBUG[2020-10-10T12:47:04-04:00] CF-RAY: ***-ORD Response content length 0
DEBUG[2020-10-10T12:47:04-04:00] CF-RAY: ***-ORD GET http://localhost:8080/img-sys/server_misconfigured.png HTTP/1.1
DEBUG[2020-10-10T12:47:04-04:00] CF-RAY: ***-ORD Request Headers map[Accept:[image/avif,image/webp,image/apng,image/*,*/*;q=0.8] Accept-Encoding:[gzip] Accept-Language:[en-US,en;q=0.9] Cdn-Loop:[cloudflare] Cf-Cloudflared-Proxy-Tunnel-Hostname:[***.cfargotunnel.com] Cf-Connecting-Ip:[***.***.***.***] Cf-Ipcountry:[CA] Cf-Ray:[***-ORD] Cf-Request-Id:[***] Cf-Visitor:[{"scheme":"https"}] Cf-Warp-Tag-Id:[***] Cookie:[_ga=***; _fbp=***; hubspotutk=***; messagesUtk=***; __cfduid=***; __hstc=***; __cf_bm=***] Referer:[https://p01d.keddy.ca/cgi-sys/defaultwebpage.cgi] Sec-Fetch-Dest:[image] Sec-Fetch-Mode:[no-cors] Sec-Fetch-Site:[same-origin] User-Agent:[Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36] X-Forwarded-For:[***.***.***.***] X-Forwarded-Proto:[https]]
DEBUG[2020-10-10T12:47:04-04:00] CF-RAY: ***-ORD Request content length 0
DEBUG[2020-10-10T12:47:04-04:00] CF-RAY: ***-ORD 304 Not Modified
DEBUG[2020-10-10T12:47:04-04:00] CF-RAY: ***-ORD Response Headers map[Connection:[Keep-Alive] Date:[Sat, 10 Oct 2020 16:47:04 GMT] Keep-Alive:[timeout=5, max=97] Server:[Apache] Vary:[Accept-Encoding]]
DEBUG[2020-10-10T12:47:04-04:00] CF-RAY: ***-ORD Response content length 0
DEBUG[2020-10-10T12:47:04-04:00] CF-RAY: ***-ORD 200 OK
DEBUG[2020-10-10T12:47:04-04:00] CF-RAY: ***-ORD Response Headers map[Accept-Ranges:[bytes] Connection:[Keep-Alive] Content-Length:[3164] Content-Type:[image/png] Date:[Sat, 10 Oct 2020 16:47:04 GMT] Keep-Alive:[timeout=5, max=98] Last-Modified:[Tue, 24 Mar 2020 19:39:40 GMT] Server:[Apache]]
DEBUG[2020-10-10T12:47:04-04:00] CF-RAY: ***-ORD Response content length 3164
DEBUG[2020-10-10T12:47:04-04:00] CF-RAY: ***-ORD GET http://localhost:8080/img-sys/error-bg-left.png HTTP/1.1
DEBUG[2020-10-10T12:47:04-04:00] CF-RAY: ***-ORD Request Headers map[Accept:[image/avif,image/webp,image/apng,image/*,*/*;q=0.8] Accept-Encoding:[gzip] Accept-Language:[en-US,en;q=0.9] Cdn-Loop:[cloudflare] Cf-Cloudflared-Proxy-Tunnel-Hostname:[***.cfargotunnel.com] Cf-Connecting-Ip:[***.***.***.***] Cf-Ipcountry:[CA] Cf-Ray:[***-ORD] Cf-Request-Id:[***] Cf-Visitor:[{"scheme":"https"}] Cf-Warp-Tag-Id:[***] Cookie:[_ga=***; _fbp=***; hubspotutk=***; messagesUtk=***; __cfduid=***; __hstc=***; __cf_bm=***] If-Modified-Since:[Tue, 24 Mar 2020 19:39:40 GMT] Referer:[https://p01d.keddy.ca/cgi-sys/defaultwebpage.cgi] Sec-Fetch-Dest:[image] Sec-Fetch-Mode:[no-cors] Sec-Fetch-Site:[same-origin] User-Agent:[Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36] X-Forwarded-For:[***.***.***.***] X-Forwarded-Proto:[https]]
DEBUG[2020-10-10T12:47:04-04:00] CF-RAY: ***-ORD Request content length 0
DEBUG[2020-10-10T12:47:04-04:00] CF-RAY: ***-ORD 304 Not Modified
DEBUG[2020-10-10T12:47:04-04:00] CF-RAY: ***-ORD Response Headers map[Connection:[Keep-Alive] Date:[Sat, 10 Oct 2020 16:47:04 GMT] Keep-Alive:[timeout=5, max=97] Server:[Apache]]
DEBUG[2020-10-10T12:47:04-04:00] CF-RAY: ***-ORD Response content length 0