cPanel Proxy: Server Wide Installation

Posted by admin
May 05 2010

cPanel Proxy is a tiny PHP speech which allows users to door cPanel, WHM and Web Mail on port 80 by performing arts like a proxy. Its very caring for public who are behind firewall.

This tutorial guides you on ow to make a server-wide installation of cPanel Proxy so all accounts produced on your server gets door to cPanel Proxy (can door cpanel on port 80)

Installing
Connect to your server via SSH and login to your normal user tab (for cPanel, this tab needs to be a limb of the veer group), then ’su -’ to root. At the prompt, type the following orders:
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

You have just downloaded the speech and installed it, with the right file ownership and permissions, into the /usr/local/share folder. The next step is to make a few changes to the Apache (web server) configuration file. Continue at the command prompt by typing the following:
pico /usr/local/apache/conf/httpd.conf

You will now be in the ‘UW PICO’ file editor. Scroll right down to the bottom of the file, and add the following shape:

ServerName cpanel.*
ServerAlias cpanel.* whm.* webmail.*
DocumentRoot /usr/local/share/cpanelproxy

Replace x.x.x.x with all the IP addresses that are configured on your server, each separated by a space – optionally, only enter the IP addresses that you want to make the cPanel Proxy speech void on. Once done, push [CTRL-O] then [RETURN] to save your changes, then push [CTRL-X] to exit the editor and restore to the command prompt.
To make possible the changes, we just need to regenerate Apache with the following command:
service httpd regenerate

Enabling Void Accounts
Previous to you will be able to door the proxy speech, we need to make some changes to DNS. For void domains, some manual steps are essential, as a few CNAME minutes need to be added to each domains zone file. This can be done any through WHM, or via the command line.
If you want to do this via WHM, once logged in to WHM, click ‘Edit a DNS Zone’ from the ‘DNS Functions’ menu on the left, select the domain you wish to edit from the list, then click the ‘Edit’ pin. Scroll the page to the top where it says ‘Add New Entries Not more than this Line’, and add the following two entries into the noteworthy boxes on the screen:
cpanel 14400 IN CNAME yourdomain.com.
webmail 14400 IN CNAME yourdomain.com.

Make your you use instead in the real name of the domain you are control and making sure that it ends with a dot as above. If you also want to add in a link to WHM, you can also add the following access:
whm 14400 IN CNAME yourdomain.com.

I in person prefer to only do this on reseller domains, and my main domain, as normal users have no need to door WHM. Once your done, click the ‘Save’ pin to perfect your changes.
If you want to do these changes via the command line, from your SSH conference, type the following command to edit the zone file directly:
pico /var/named/yourdomain.com.db

Make sure you use instead in the real name of your domain into the command above. You will now be back in the ‘UW PICO’ file editor. Scroll to the end of the file, and add the following shape:
cpanel 14400 IN CNAME yourdomain.com.
webmail 14400 IN CNAME yourdomain.com.

Again, make sure you use instead in the real name of your domain, making sure that it ends with a dot as above. As mentioned previously, if you also want to add in a link to WHM, you can also add the following access:
whm 14400 IN CNAME yourdomain.com.

Once done, push [CTRL-O] then [RETURN] to save your changes, then push [CTRL-X] to exit the editor and restore to the command prompt. The closing step is to force your DNS server to re-read its configuration files, so that your changes take look. At the command line, type:
killall -HUP named

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

Enabling New Accounts
The closing part of this HOW-TO is to make possible the proxy speech for all new accounts reluctantly, which avoids having to make the manual changes above in the prospect. From your SSH conference, type the following orders:
pico /var/cpanel/zonetemplates/ordinary

You will now be in the ‘UW PICO’ file editor. Scroll to the bottom of the file, and add the following shape:
cpanel IN CNAME %domain%.
webmail IN CNAME %domain%.

Push [CTRL-O] then [RETURN] to save your changes, then push [CTRL-X] to exit the editor and restore to the command prompt. Next, type the following, at the command prompt:
pico /var/cpanel/zonetemplates/standardvirtualftp

Again, you will now be back in the ‘UW PICO’ file editor. Scroll to the bottom of the file, and again add the following shape:
cpanel IN CNAME %domain%.
webmail IN CNAME %domain%.

Push [CTRL-O] then [RETURN] to save your changes, then push [CTRL-X] to exit the editor and restore to the command prompt. You have now edited the default DNS zone template files, which are used to start the zone files for new domains – this earnings new accounts will reluctantly have the right entries to door the cPanel Proxy speech on their domain. I’ve not included the WHM access, since I judge this must be manually added to reseller domains only, since normal users have no need to door WHM.

PS: This How-To was originally in print by Unofficial-Help(.com) (http://unofficial-help.com/node/view/50). As the site doest exit any more i have worn-out their tutorial from an ancient archive. All credits go to the first chief (simon).

Comments are closed.

Bad Behavior has blocked 97 access attempts in the last 7 days.