Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Can't access webmail

Discussion in 'E-mail Discussion' started by luthfiset, Aug 15, 2017.

  1. luthfiset

    luthfiset Registered

    Joined:
    Aug 15, 2017
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    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.
     
  2. luthfiset

    luthfiset Registered

    Joined:
    Aug 15, 2017
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    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@domain.com
    
        <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.
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,711
    Likes Received:
    1,794
    Trophy Points:
    363
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. luthfiset

    luthfiset Registered

    Joined:
    Aug 15, 2017
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Indonesia
    cPanel Access Level:
    Root Administrator
    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.
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,711
    Likes Received:
    1,794
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice