How to forward the traffice from port 80 to custom port

Hi ,

how to do port forward from http://example.com/api/ i.e port 80 (http) traffic to custom port by using the cloudflare origin rule.

To forward traffic from port 80 to a custom port using Cloudflare, you can set up an Origin Rule:

  1. Log in to your Cloudflare dashboard.
  2. Go to the “Rules” section.
  3. Click on “Create a rule” under “Origin Rules”.
  4. Choose the hostname and path (e.g., example.com/api/).
  5. Set the “Override” options to your custom port.
  6. Save and deploy the rule.

You can read more on overriding destination ports here:

Please note that the custom port must be one of the ports supported by Cloudflare.

CJ313