Knowledgebase
Knowledgebase
Connecting to cPanel/WHM Through Port 80
Posted by Will Kruss on 27 May 2016 05:14 PM

Don't have any idea how to Connect to cPanel or WHM through port 80? Follow step by step tutorial and do it yourself.

CPANEL and WHM usually uses un-common port which can be blocked by local firewalls. To access it through subdomains on port 80 do the following:

Install cPanel Proxy

Edit Apache Config File

  • yum install -y nano
  • nano /usr/local/apache/conf/httpd.conf

Scroll down to the bottom and add:

<VirtualHost x.x.x.x>
ServerName cpanel.*
ServerAlias cpanel.* whm.* webmail.*
DocumentRoot /usr/local/share/cpanelproxy
<IfModule mod_suphp.c>
suPHP_UserGroup nobody nobody
</IfModule>
</VirtualHost>

(replace x.x.x.x with your primary IP address)

Edit DNS Entry

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.

Note: This does limit you to 2MB file uploads through the cPanel File Manager.

(0 vote(s))
Helpful
Not helpful