Cloudflare Teams - Argo tunnels

I am attempting to test out the Cloudflare teams, access, agro tunnel access to a WordPress server hosted on a Linux server. I have successfully created and tested the Argo tunnel and DNS entry however every time I attempt to access the WordPress server over the Argo tunnel I am presented with the error " ERR_TOO_MANY_REDIRECTS".

Below is my config.yml file on my WordPress server;

url: http://localhost:80
tunnel: c03eb412-ae95-4e9d-918c-44611ce07dd7
credentials-file: /root/.cloudflared/c03eb412-ae95-4e9d-918c-44611ce07dd7.json

Has anyone else ran into issues with argo tunnels and " ERR_TOO_MANY_REDIRECTS" errors?

1 Like

Is your WordPress server opening port 443 and performing redirection from HTTP to HTTPS?

Seems like you setup to auto-redirect from HTTP to HTTPS in your Cloudflare dashboard and the same request was made in your server configuration (Nginx etc.) in this case you get a loop in redirects.

Try to remove forwarding from your server configuration (works vice-versa depending on your preferences). Let me know if you need references.

Yes, Please see below the Bitnami config.

BEGIN: Enable HTTP to HTTPS redirection

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} !^localhost
RewriteCond %{HTTP_HOST} !^[0-9]+.[0-9]+.[0-9]+.[0-9]+(:[0-9]+)?$
RewriteCond %{REQUEST_URI} !^/.well-known
RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [R,L]

END: Enable HTTP to HTTPS redirection

<Directory “/opt/bitnami/apache2/htdocs”>
Options Indexes FollowSymLinks
AllowOverride All
<IfVersion < 2.3 >
Order allow,deny
Allow from all

= 2.3 >
Require all granted

I’ve playing around with the SSL/TLS options in cloudflare dashboard however regardless of options picked (off,flexiable,full,full(strict) all is presenting the same issue.

It’s recommended to point to https://localhost:443 directly since your WordPress server is supporting HTTPS. This will solve the redirection issue.

If you are still getting errors after setting the above URL (especially Error 502), probably the SSL cert in your server is invalid and you need to specify no-tls-verify: true option in the YML file.

2 Likes

This line makes a redirect loop (ERR_TOO_MANY_REDIRECTS), however, the solution by @erictung should solve your issue.

In general, if your connections are proxied, give some time for changes made (few minutes) if you are “playing around” with settings.

Thanks! This worked a treat.

DNS records associated with Cloudflare Tunnel must be proxied :wink:, and switching different SSL encryption mode shouldn’t interfere with the tunnel connections too, though it’s a good practice to stay in Full (strict) mode.

My pleasure.

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.