yum install nginx -y
cat <<EOF >> /etc/nginx/conf.d/reverse-proxy.conf
server {
listen <port>;
listen [::]:<port>;
location / {
# replace host:port definitions with new one in response bodies
sub_filter '<host:port>' '<new host>';
sub_filter_types *;
sub_filter_once off;
# allow response body manipulation
proxy_set_header Accept-Encoding "";
# proxy all traffic to
proxy_pass <protocol>://<host>:<port>;
# replace redirect 'Location' headers with new one
proxy_redirect <old protocol://host:port> <old protocol://host:port>;
}
}
systemctl restart nginx.service