Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    Jun 2008
    Posts
    48

    Question webmail subdomain doesn't work

    Hello,

    I have a fresh install of WHM/cPanel with one domain moved to it for testing. All seems well with our implementation, however, when you try to hit webmail.example.com, we get the default cPanel Apache page that says:

    Great Success !
    Apache is working on your cPanel® and WHM™ Server

    Anyone know what could be causing this?

  2. #2
    Member
    Join Date
    Jun 2008
    Posts
    48

    Default

    This is resolved, I just needed to check the following option under "Tweak Settings":

    Add proxy VirtualHost to httpd.conf to automatically redirect unconfigured cpanel, webmail, webdisk and whm subdomains to the correct port (requires mod_rewrite and mod_proxy)

  3. #3
    Member saninfosys.com's Avatar
    Join Date
    Oct 2009
    Posts
    20

    Default

    It should be http://example.com/webmail OR Example Web Page instead of webmail.example.com

  4. #4
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by saninfosys.com View Post
    It should be http://example.com/webmail OR Example Web Page instead of webmail.example.com
    While not the best method for accessing webmail, webmail.example.com (which only uses port 80) is acceptable as of version 11.23 of cPanel/WHM when the aforementioned tweak setting is enabled.

  5. #5
    Member
    Join Date
    Apr 2009
    Posts
    230

    Default

    1. Create an ‘A’ record for the sub-domain ‘webmail’ in the DNS zone file. It should look like :

    domain.com. IN A XX.XX.XXX.XXX
    localhost.domain.com. IN A 127.0.0.1
    domain.com. IN MX 0 domain.com.
    mail IN CNAME domain.com.
    www IN CNAME domain.com.
    ftp IN A XX.XX.XXX.XXX
    cpanel IN XX.XX.XXX.XXX
    whm IN A XX.XX.XXX.XXX
    webmail IN A XX.XX.XXX.XXX
    webdisk IN A XX.XX.XXX.XXX

    2. Put the following code inside .htaccess in the sub-domain folder ( virtual sub-domain which doesn’t have an entry in httpd.conf

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^webmail.domain.com$ [OR]
    RewriteCond %{HTTP_HOST} ^www.webmail.domain.com$
    RewriteRule ^.*$ “http\:\/\/domain\.com\/webmail” [R=301,L]

  6. #6
    Member
    Join Date
    Oct 2010
    Posts
    9

    Default

    I have found that the webmail.domain.tld redirect to domain.tld:2095 (the webmail port of cPanel) may not work as well.

    So here's a simpler .htaccess rule which you can set at the root of a cPanel account so it can affect all addon domains and best of all, it does not have a hardcoded domain on it

    Code:
    # Redirect webmail.domain.tld to domain:2095 for cPanel Webmail only
    RewriteCond %{HTTP_HOST} ^webmail\.(.+)$ [NC]
    RewriteRule ^(.*)$ http://%1/webmail/$1 [R=301,L]
    This will make sure webmail.domain.tld is redirected to domain.tld/webmail which in turn cPanel will push to domain:2095 - aka your webmail login.

    Enjoy!

Similar Threads & Tags
Similar threads

  1. Webmail - squirrel, horde and roundcube doesn't work
    By khorinis in forum E-mail Discussions
    Replies: 7
    Last Post: 04-28-2011, 01:48 PM
  2. Webmail - squirrel, horde and roundcube doesn't work
    By khorinis in forum New User Questions
    Replies: 5
    Last Post: 04-28-2011, 08:58 AM
  3. After domain change webmail doesn't work.
    By ArbuZz in forum E-mail Discussions
    Replies: 1
    Last Post: 02-14-2008, 05:15 AM
  4. Webmail doesn't work
    By h4f in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 01-02-2008, 01:09 AM
  5. deleting subdomain doesn't work
    By Radio_Head in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 05-15-2003, 06:23 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube