Is it possible for CloudFlare to get content from 8080 and serve it on 80?
Is it possible for CloudFlare to get content my server provides over port 8080 and serve it on port 80 to users?
For instance, I have the following IP address 0.0.0.0
and domain example.ga
(registered with CloudFlare). Can CloudFlare retrieve content from 0.0.0.0:8080
and display it on example.ga:80
?
To the best of my knowledge, no. CloudFlare on the free plan can't do port translation. If you make a request on port 80, CloudFlare will send it to your origin on port 80. CloudFlare is essentially invisible. On the enterprise plan CloudFlare may be able to do this for you.
If your server is on port 8080 you should install a reverse proxy. This can be on the same server as the application server, or on a different server. On a different server, with appropriate firewall rules, you can make a DMZ, which increases security.
Nginx is very commonly used as a reverse proxy, either on the same server as your app server or a different server. Nginx can easily accept requests on port 80 then pass them on to an app server running on port 80. It's very lightweight, requiring very little CPU or RAM.
Nginx can also cache pages, based on rules you define, to accelerate serving static resources or anonymous pages. Serving a page from a cache takes much less work than generating the page again. Nginx reverse proxy guide here. I also have an Nginx/Wordpress guide that will give you some more examples on how to cache pages for anonymous users, but not logged in users.
Update based on comments
Apparently on Linux you can use iptables to redirect ports. So for example a server running on port 8080 can respond on port 80. This would have to be set up by a user who as root privileges, as non-privileged users can't listen to ports below 1024.