Point to Webserver at Port 8084


#1

Hi, is it possible to tell CloudFlare that the webserver ist running at another Port?


#2

If you dont proxy you can point it to wherever you want, otherwise you are restricted to the official ports and their associated protocols.

The only workaround could be manual proxying with workers.


#4

Oops, another try. Ich accidencially used wrong language… Can I Tell CloudFlare to forward requests from Port 80 to Port 8088?


#5

No, ports are not redirected. With a worker you could achieve that but that would be paid.


#6

Okay. Ty!


#7

Can I configure Nginx to forward all Clients from CloudFlare to another Webpage (different Port in Same Hostname)


#8

I am not all that familiar with Nginx but I am pretty confident you can configure it as a proxy to accomplish what you are looking for. Search for “proxy configuration nginx” on the search engine of your preference.


#9

To specifically answer: since Cloudflare is the proxy for that hostname, redirecting a client (301/302) will just send them back to cloudflare at the unsupported port, not directly to your server. This is due to how DNS works.

But definitely look into @sandro’s answer. A proxy_pass configuration on nginx should allow you to proxy your server’s 8084 port, but to where it shows up as the regular port 443 in browsers.


#10

Would that Work If I Change the Port to Port 8088 (a supported Port)?


#11

8088 is not supported by Cloudflare.

What exactly does your setup look like and what do you want to achieve?


#12

Sorry, I meant 8080.


#13

8080 is supported. If you pick 8080 you need to be able to accept that on your server too. It is not secure though.


#14

I am trying to so the following: Running a Mailcow Server (Nginx based) on port 80 at gui.***.ga and running another Service (Nextcloud and a few online tools) on another Port proxied by CloudFlare.


#15

If it runs on port 80 why do you need to redirect it? That is supported out of the box. Also, it is not secure, is that fine with you?


#16

Additionaly I can’t run Mailcow proxied by CloudFlare, because that would break SMTP, IMAP etc.
I did meant Port 80/443, sorry. Forced forward from Port 80 to 443.
I have to Stop posting now, first-day-limit is reached.


#17

The mail services cant run via the proxy, but the web-based services can. Simply configure it on port 443, set up a proper certificate and route it through the Cloudflare proxy. For the mail parts go directly to the server bypassing Cloudflare. Wouldnt that work?