Enabling Modules for ReverseProxy

Update package lists:

apt-get update

Install Apache2 with mod_proxy:

sudo apt-get install libapache2-mod-proxy-html

Install libxml2 module:

apt-get install libxml2-dev

On /etc/apache2/apache2.conf add below code

LoadModule  proxy_module         /usr/lib/apache2/modules/
LoadModule  proxy_http_module    /usr/lib/apache2/modules/
LoadModule  headers_module       /usr/lib/apache2/modules/
LoadModule  deflate_module       /usr/lib/apache2/modules/
LoadFile    /usr/lib/x86_64-linux-gnu/

Add a sample reverse proxy configuration to the same file:

ProxyPass /subfolder
ProxyPassReverse /subfolder

Restart Apache2:

systemctl restart apache2