Apache Web Server (httpd) in RHEL and CentOS are similar.
$ yum install httpd mod_proxy mod_ssl mod_proxy_html mod_rewrite -y
httpd : httpd daemon install http server (web) apache
mod_proxy : This library usually comes by default. This helps for proxy setup (Forward / reverse)
mod_ssl : This library helps for HTTPS connection support in mod_proxy (proxy) to do for HTTPS as well
mod_proxy_html : This library supports for rewrite rule to support html, images and other content loading in apache
mod_rewrite : This library helps for rewrite rule in apache configuration.
$ grep 'mod_proxy' /etc/httpd/conf.modules.d/00-proxy.conf
Above command will show you already the mod proxy libaries loaded (LoadModule) in apache (httpd) and in the same configuration you will see for ssl (LoadModule configuration) in different *.conf
In order for apache to achieve forward and reverse proxy create below configuration.
Create reverse-proxy.conf file or your own file naming file and have the below configuration.
$ vi /etc/httpd/conf.d/reverse-proxy.conf
# Below fields helps on forward proxy request and proxy time out
ProxyRequests On
ProxyVia On
ProxyTimeout 60
# Below field helps to turn on HTTPS configurations (reverse / forward)
SSLProxyEngine On
# Proxy servers permissions
Require all granted
# Specify Forward proxy remote servers
# Specify no proxy servers
# Reverse proxy urls and connectiontimeout happens when there is no response from the url
Restart 'service httpd restart' after configuration changes.
You can add environment variables in file '/etc/sysconfig/httpd' if required.
Best Article to know about forward-reverse proxy :