I was wanting to use the firewall although when i installed firewalld it conflicted with the Plesk firewall, so I’m not quite sure how to handle that.
Do you have an example of the nginx directive to use proxy pass in the way you describe?
Thanks!
Note: there's been three different solutions mentioned.
a) a redirect - this will receive an HTTP request, and respond with a location header asking the browser to access the new URL. Likely not what you want.
b) a HTTP proxy - this was receive the HTTP request, and send that same request to the server you're proxying to, then return that response to the browser. Ths can act as a "port forwarder" - but this only operates on an application level, in this case, HTTP.
c) port forwarding can also be done at a lower level that'll pass all, or some connections to the port. IPTables is a great solution for this:
Linux Port Forwarding Using iptables - SysTutorials. This is the solution you want if you're not forwarding HTTP traffic
The implication for c) is that all traffic that matches the rule will get forwarded. Since you're on 80, all HTTP traffic will be forwarded to 7272, whether you want to or not. Therefore, if you've also got Apache listening on the IP you want to port-forward, Apache will no longer server the requests as the firewall steps in before Apache even gets the request.