luthfiset

Registered
Aug 15, 2017
3
0
1
Indonesia
cPanel Access Level
Root Administrator
Hello everyone

I had some problem after upgrade WHM from v60 to v64. Previously I can access webmail by domain like webmail.domain.com but after upgrade this domain only open the web page same as domain.com. I can still access webmail from domain.com/webmail but our customer need a reason why (because they always use webmail.domain.com).
Code:
[root@mail ~]# grep '' /etc/redhat-release /usr/local/cpanel/version /var/cpanel/envtype ; grep CPANEL= /etc/cpupdate.conf
/etc/redhat-release:CentOS release 6.9 (Final)
/usr/local/cpanel/version:11.64.0.36
/var/cpanel/envtype:vmware
CPANEL=release
Thanks.
 

luthfiset

Registered
Aug 15, 2017
3
0
1
Indonesia
cPanel Access Level
Root Administrator
Problem solved.

After a slightly change on httpd.conf
Code:
<VirtualHost 111.11.11.11:80 127.0.0.1:80>
    ServerName mail.domain.com
    ServerAlias cpanel.* whm.* webmail.* webdisk.* cpcalendars.* cpcontacts.*

    DocumentRoot /var/www/html
    ServerAdmin [email protected]

    <IfModule suphp_module>
        suPHP_UserGroup nobody nobody
    </IfModule>
    <Proxy "*">
        <IfModule security2_module>
            SecRuleEngine Off
        </IfModule>
    </Proxy>


    RewriteEngine On
    RewriteCond %{HTTP_HOST} !^mail.domain.com$
    RewriteCond %{HTTP_HOST} ^cpanel\.
    RewriteRule ^/(.*) http://127.0.0.1:2082/$1 [P]

    RewriteCond %{HTTP_HOST} !^mail.domain.com$
    RewriteCond %{HTTP_HOST} ^webmail\.
    RewriteRule ^/(.*) http://127.0.0.1:2095/$1 [P]
webmail port is wrong (2095), then I change it to 2096 and webmail.domain.com working again.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Hello,

It looks like you may have been using custom a Apache virtual host entry for this domain name, or custom Apache templates in the /var/cpanel/templates/apache2_4 directory. Can you verify if that's the case?

Thank you.
 

luthfiset

Registered
Aug 15, 2017
3
0
1
Indonesia
cPanel Access Level
Root Administrator
Hello,

It looks like you may have been using custom a Apache virtual host entry for this domain name, or custom Apache templates in the /var/cpanel/templates/apache2_4 directory. Can you verify if that's the case?

Thank you.
We never edit cpanel template. This case hapen when we update WHM update.
Here some line inside /var/cpanel/templates/apache2_4/ea4_main.default
Code:
    RewriteEngine On
    RewriteCond %{HTTP_HOST} !^[% wildcard_safe(servername) %]$
    RewriteCond %{HTTP_HOST} ^cpanel\.
    RewriteRule ^/(.*) http://127.0.0.1:2082/$1 [P]

    RewriteCond %{HTTP_HOST} !^[% wildcard_safe(servername) %]$
    RewriteCond %{HTTP_HOST} ^webmail\.
    RewriteRule ^/(.*) http://127.0.0.1:2095/$1 [P]
On the template itself use port 2095 not 2096. Maybe it's a typo or somethin i don't know because we never edit those file.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Hello,

Could you open a support ticket using the link in my signature so we can take a closer look at your system to see what's happening?

Thank you.