Error 404 on tunnel adress and no sign of activity on my local website

What is the name of the domain?

None

What is the error number?

Error 404

What is the error message?

HTTP ERROR 404

What is the issue you’re encountering

The tunnel doesn’t work but there’s no error on Cloudflared’s side and no sign of activity on my local website (on port 8080) using this command : “cloudflared tunnel --url http://localhost:8080” (Sry for the screenshot I’m French)

What steps have you taken to resolve the issue?

I didn’t resolve it

What are the steps to reproduce the issue?

-Launch my website on localhost:8080 (working)
-Start a tunnel with : “cloudflared tunnel --url http://localhost:8080
-Open the given link

Screenshot of the error

And as you can see, no sign of activity on my website :

And no error in the created tunnel :

Can you try to configure it and run under local IP like 192.168.xx.xx and not under the localhost 127.0.0.1? :thinking:

Otherwise, keep 127.0.0.1, but use https:// and since you’re using HTTP and 8080, threfrom wanting to open over HTTPS, you’d need to enable the TLSNoVerify option for the public hostname on the tunnel you’re using as well.

If the tunnel was created in the dashboard - easier to manage:

What kind of an app is it? PHP, Django Python?
Are your hosts file configured or?
Is it bound to an IP address specifically or?

If you’re running tunnel from CLI, locally, might be you’re missing default 404 section in the config file? :thinking:

If running via CLI locally from the host, an example of the config.yml:

tunnel: CLOUDFLARED-TUNNEL-ID
credentials-file: /root/.cloudflared/COUDFLARED-TUNNEL-ID.json

ingress:
 - hostname: service.example.tld
   service: https://127.0.0.1:8080
   originRequest:
     connectTimeout: 30s
     noTLSVerify: true
 - service: http_status:404

Despite we can run on whatever protocol we like, that said, 8080 is traditionally used as an alternate HTTP (80) port, while e.g. 8443 is used for an alternate HTTPS (443) port - usually I use it like that so I don’t confuse myself.

Well… Here’s the server code that I use (I changed the IP based on what you said) : "from http.server import HTTPServer, SimpleHTTPRequestHandler

class MyHandler(SimpleHTTPRequestHandler):
def do_GET(self):
self.send_response(200)
self.send_header(‘Content-type’, ‘text/html’)
self.end_headers()
self.wfile.write(b"“”

Hello World Server

Hello World!

This is a simple HTTP server.

""")

def run_server(port=8080): # Using standard HTTP port
server_address = (‘192.168.1.153’, port)
httpd = HTTPServer(server_address, MyHandler)

print(f"Server running on http://192.168.1.153:{port}")
print("Press Ctrl+C to stop the server")

try:
    httpd.serve_forever()
except KeyboardInterrupt:
    print("\nShutting down the server...")
    httpd.server_close()

if name == ‘main’:
run_server()
" but I just used the try cloudflared command but using a real tunnel with my own domain well I get the error ‘Error 1016, Origin DNS error’


And I’ll send Images of my DNSs

Here they are :

And :

Hello? @fritex

Wonder if the ISP is blocking something, despite it shouldn’t.

So you changed the bound IP address and port as well, therefrom switched to HTTPS, correct? :thinking:

Anything else you’ve done like removing the tunnel, or modifying something locally? :thinking:

I’d suggest you to switch to the management of the tunnel(s) from the Dashboard since it’s way much more easier and simple.

Furthermore, since it’s Python app, are you proxying it via some web server or? :thinking: