Understanding Mod_proxy

Posted on August 4th, 2016

Mod_proxy is an apache module that is used for implementing a proxy for apache web server. Mod_proxy provides basic proxy capabilities and it manages connections and redirects them. It is used to support virtual host proxies. Mod_proxy can be used as a forward or reverse proxy. A forward proxy forwards to an arbitrary destination where as a reverse proxy forwards to a fixed destination. We can also configure mod_proxy modules to connect to other proxy modules. Mod_proxy module in apache acts as a load balancing tool.

Mod_proxy module is divided into many types, they are

1) mod_proxy_http: This module is an http support module of mod_proxy and it handles fetching documents with HTTP and HTTPS.

2) mod_proxy_ftp: This module is an ftp support module of mod_proxy and it handles fetching documents with FTP.

3) mod_proxy_connect: This module is used for connect request handling. It handles the CONNECT method for secure (SSL) tunneling.

4) mod_proxy_ajp:  It is an AJP support module of mod_proxy and it handles the AJP protocol for Tomcat and similar backend servers.

5) mod_proxy_balancer: It is a mod_proxy extension for load balancing. It implements clustering and load-balancing.

6) mod_cache, mod_disk_cache, mod_mem_cache: This module is used for managing a document cache. To enable caching requires mod_cache and one or both of disk_cache and mem_cache.

7) mod_proxy_html: This module is used to provide an output filter to rewrite html links. This rewrites HTML links into a proxy’s address space.

8) mod_proxy-wstunnel: Used for working with web-sockets.

9) mod_deflate: Used for compression.

 

Mod_proxy is also known as a multi-protocol or gateway server.

 

Enable mod_proxy module in HTTPD

Please make sure that the following lines in your httpd configuration file. If they are not present, add them to the bottom. If they are present but the lines begin with a comment (#) character, remove the character. Save the file afterward. Usually, the modules are already present and enabled.

LoadModule proxy_module modules/mod_proxy.so

LoadModule proxy_balancer_module modules/mod_proxy_balancer.so

LoadModule proxy_http_module modules/mod_proxy_http.so

 

Installation:

In cPanel servers, we can install mod-proxy using EasyApache.

1) Log in to WHM.

2) Go to the section ‘Software’.

3) Click the icon ‘EasyApache’

4) Click Next step in apache version page.

5) Click Next step in PHP version page.

6) Click Exhaustive options list.

7) Select proxy option for installing mod_proxy.

8) Click button ‘Save and Build’.

 

If you need any further assistance please reach our support department

 

 

Leave a Reply