How to create a Cloudflare Pages website on non-standard ports such as :2345?

I have the source of an abandoned website, which is a website can run without server based on EJS. In the original server, the default port is set on :2345. I want to inherit this tradition of making the default port at :2345, but I want to use Cloudflare Pages to reduce the cost of a physical server. So how can I setup the website on port :2345 on Cloudflare Pages?
10 Replies
Walshy
Walshy5mo ago
You can't nor is this normal for sites Are you wanting users to connect on :2345?
Peter JY
Peter JYOP5mo ago
Yes. They can only connect to :2345 in my case.
Walshy
Walshy5mo ago
Yeah not possible
Peter JY
Peter JYOP5mo ago
What if using functions or workers?
Walshy
Walshy5mo ago
No, Cloudflare itself just doesn't accept non-standard ports You can't connect to a Cloudflare site over :2345 without using something like Spectrum which is a very different setup/purpose
Peter JY
Peter JYOP5mo ago
So if I tryly want to make it, I have to add a DNS rule to make a redirection? using the type SRV to map port :2345 to the standard port :80?
Erisa
Erisa5mo ago
SRV records don't work with http/https, they have a very specific meaning for a limited amount of protocols
Joe Simpson
Joe Simpson5mo ago
Expect you could run NGINX on a basic Digital Ocean droplet for 4USD a month and rewrite the URLs
Peter JY
Peter JYOP5mo ago
So how can I do that freely? Is it possible to use Origin Rules for another domain (e.g. havyuxew.com) to redirect port havyuxew.com:2345 to my Pages website xxx.pages.dev:80 and redirect havyuxew.com:80 to xxx.pages.dev:2345? Or page rules?
Walshy
Walshy5mo ago
Cloudflare doesn't accept port 2345 without something specialised like Spectrum which is not intended for this and would be expensive for this Again, I'd really just recommend using a standardised web port.
Want results from more Discord servers?
Add your server