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?
#Cloudflare Tunneling issue
9 messages · Page 1 of 1 (latest)
How did you configure the tunnel? Locally or remotely? Can you share your tunnel and nginx configs?
~/.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;
}
}
And you have a proxied CNAME record to your tunnel?
i have but when I do dig mywebsite.com +short command I don't get the tunnel hostname as output
should i wait?
i waited 30 minutes and CNAME record didn't change
You never get the tunnel cname as output.
Your CNAME target looks like this? abcdefg-1234-5678-abcd-abcdefg1234567.cfargotunnel.com?
Can you share the domain? It definitely works if you open http://192.168.0.136:80 from the same machine the tunnel is running on?
Did you reload nginx after making the config changes? Is nginx running on the same machine the tunnel is installed on?
It finally works now