#Cloudflare Tunneling issue

9 messages · Page 1 of 1 (latest)

livid sail
#

Like I understood you can host your websites via cloudflare tunneling without port forwarding?
That's what I did but now it's causing me issues for example I can't host it at all. I am hosting my website via ngnix and it runs perfectly locally on that but when I open cloudflare tunnels the website is not working (yeah I bought a domain for my website) I put the correct nameservers and cloudflare said it's setup and everything is ready but I can't access my website without getting that stupid 522 error. Can anyone please help me?

ionic idol
livid sail
# ionic idol How did you configure the tunnel? Locally or remotely? Can you share your tunnel...

~/.cloudflared/config.yml:

tunnel: <MY-TUNNEL-ID>
credentials-file: /home/terryadavis/.cloudflared/<MY-TUNNEL-ID>.json

ingress:
  - hostname: mydomain.com
    service: http://192.168.0.136:80
  - hostname: www.mydomain.com
    service: http://192.168.0.136:80
  - service: http_status:404

configuration file /etc/nginx/conf.d/vue-app.conf:

server {
    listen 80;
    server_name mydomain.com www.mydomain.com;
    root /var/www/html/my-vue-app;
    index index.html;

    location / {
        try_files $uri $uri/ /index.html;
    }
}
ionic idol
#

And you have a proxied CNAME record to your tunnel?

livid sail
#

i have but when I do dig mywebsite.com +short command I don't get the tunnel hostname as output

#

should i wait?

livid sail
#

i waited 30 minutes and CNAME record didn't change

ionic idol