How to install Cpanel Proxy

CPANEL and WHM usually uses  non-common port which can be blocked by local network policy.
CPANEL (non-https) uses port 2082, WHM uses port 2087, and webmail uses port 2095.

There is no perfect solution for this , but by installing cpanel proxy we can find a temporary solution.

Here’s how to install cPanel Proxy on your server :

 

#cd /usr/local/src
#wget http://cpanelproxy.net/cPanelProxy.zip
#mkdir cpanelproxy
#cd cpanelproxy
#unzip ../cPanelProxy.zip
#cd ..
#chown nobody.nobody cpanelproxy -R
#chmod 755 cpanelproxy -R
#mv cpanelproxy /usr/local/share

The next step is to make a few changes to the Apache (web server) configuration file.

vi /usr/local/apache/conf/httpd.conf

 

Scroll right down to the bottom of the file, and add the following lines:

<VirtualHost x.x.x.x> ServerName cpanel.* ServerAlias cpanel.* whm.* webmail.* DocumentRoot /usr/local/share/cpanelproxy </VirtualHost>

Replace x.x.x.x with all the IP addresses that are configured on the server.

To enable the changes, we just need to restart Apache with the following command:

service httpd restart

Enabling cPanel Proxy Existing Accounts :


For this we need to make some changes to DNS. For existing domains, few CNAME records need to be added to each domains zone file. This can be done either through WHM, or via the command line.

Through WHM this can be done in the following ways:

1. Login to WHM

2. Click ‘Edit a DNS Zone’ from the ‘DNS Functions’ menu on the left

3. Select the domain you wish to edit from the list, then click the ‘Edit’ button.

Scroll the page to the point where it says ‘Add New Entries Below this Line’, and add the following two entries into the relevant boxes on the screen:

 

cpanel 14400 IN CNAME yourdomain.com.
webmail 14400 IN CNAME yourdomain.com.

If you also want to add in a link to WHM, you can also add the following entry:

whm 14400 IN CNAME yourdomain.com.

Once your done, click the ‘Save’ button to complete your changes.

Via the command line you can make these changes in the following way, from your SSH session, type the following command to edit the zone file directly:

vi /var/named/yourdomain.com.db 

Scroll to the end of the file, and add the following lines:

cpanel 14400 IN CNAME yourdomain.com. webmail 14400 IN CNAME yourdomain.com.

As mentioned previously, if you also want to add in a link to WHM, you can also add the following entry:

whm 14400 IN CNAME yourdomain.com.

You will be now able to open your web browser to http://cpanel.yourdomain.com/ and be correctly prompted for your username and password.

Both comments and pings are currently closed.

Comments are closed.