Installing mod_proxify on cPanel

Posted: 1p in cPanel

mod_proxify is a module that comes with Apache, but it is not installed by default. The easiest way to install this is to add it as a dynamic module using the apxs tool. On a cPanel server, the apxs binary is located at /usr/local/apache/bin/apxs.

You will need to first check which version of Apache is running for you. I am explaining this with respect to Apache 2.2.4.

Download the tar file for Apache from : http://mirrors.24-7-solutions.net/pub/apache/httpd/httpd-2.2.4.tar.gz

Untar it and enter the directory for modules/proxy:

tar -zxf httpd-2.2.4.tar.gz

cd httpd-2.2.4/modules/proxy/

Now, normally what we do is to to compile the mod_proxy.c with apache as :

/usr/local/apache/bin/apxs -i -a -c mod_proxy.c

But, this will not work and will create an error when we start apache :

httpd: Syntax error on line 54 of /usr/local/apache/conf/httpd.conf:
Cannot load /usr/local/apache2_2/modules/mod_proxy.so into server:
/usr/local/apache2_2/modules/mod_proxy.so: undefined symbol:
ap_proxy_location_reverse_map

The solution is to compile all the *.c modules in the proxy directory. However, there is another error waiting for you :

/usr/local/apache/bin/apxs -i -a -c *.c

apxs:Error: Sorry, cannot determine bootstrap symbol name.

The solution:

/usr/local/apache/bin/apxs -i -a -c -n proxy *.c

All set and you will see that the module will be compiles as module_proxify at your httpd.conf. Don’t bother about the name; just check if it works
=========================================================

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s