YoYo
YoYo
CDCloudflare Developers
Created by YoYo on 11/3/2024 in #general-help
How do I route cloudflare pages through my nginx proxy which is hosted locally using cloudflared?
I have a web app hosted on cloudflare pages and I have my other services running in a docker network with nginx as the reverse proxy locally which is being tunnelled using cloudflare tunnel to a wildcare domain name *.example.com. I am able to access all my other services as you can see in the template below like api.example.com, search.example.com but whenever I go app.example.com which is supposed to proxy to my cloudflare pages, I get a 400 bad request page. How do i resolve this? Is it happening because of the ssl certificates I am using as the certificates being used in my nginx proxy are locally signed ssl certificates. I have been struggling with this. Can anyone please help me?
3 replies
CDCloudflare Developers
Created by YoYo on 11/2/2024 in #pages-help
How to proxy a cloudflare hosted pages app to show on my subdomain which is managed by nginx?
I have a cloudflare pages app, let's call it dashboard.pages.dev. I am using nginx as my reverse proxy. Let's say my main server where nginx is running and managing requests is accessible on the domain example.com. I want to access my pages app on a subdomain of example.com . How do i do that? I am using the following configuration for the pages app like so:
4 replies
CDCloudflare Developers
Created by YoYo on 8/24/2024 in #workers-help
How to deploy next app using cloudflare workers?
I know that cloudflare offers pages for easy deployment of next. I cannot use pages because my repo is not hosted on github/gitlab. I looked at next-on-pages project and I am building my project using next-on-pages as the build command in my script which creates a .vercel directory and I have setup the main file of the worker correctly as well. This is my wrangler.toml file:
name = "dashboard"
type = "javascript" # or "module" if you are using the modules syntax
main = ".vercel/output/static/_worker.js/index.js"

compatibility_date = "2024-08-24"
compatibility_flags = [ "nodejs_compat" ]

[site]
bucket = ".vercel/output/static"

[env]
workers_dev = true # or false if you're deploying to a custom domain

[build]
command = "npm run cfbuild"
name = "dashboard"
type = "javascript" # or "module" if you are using the modules syntax
main = ".vercel/output/static/_worker.js/index.js"

compatibility_date = "2024-08-24"
compatibility_flags = [ "nodejs_compat" ]

[site]
bucket = ".vercel/output/static"

[env]
workers_dev = true # or false if you're deploying to a custom domain

[build]
command = "npm run cfbuild"
where cfbuild is my custom script. I deploy this project to workers using wrangler deploy and the deployment happens correctly but when I visit the worker link, I am getting Internal Server Error. How do i fix it?
10 replies