The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

mail.domain.com -> www.domain.com/webmail

Discussion in 'E-mail Discussions' started by projectandrew, Sep 16, 2003.

  1. projectandrew

    projectandrew Well-Known Member

    Joined:
    Aug 27, 2003
    Messages:
    185
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    United Kingdom
    Any way to automatically configure domains to redirect mail.domain.com to www.domain.com/webmail?

    Thanks!

    cPanel.net Support Ticket Number:
     
    #1 projectandrew, Sep 16, 2003
    Last edited: May 20, 2004
  2. WMS

    WMS Active Member

    Joined:
    Jul 18, 2003
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Moscow
    Add it into httpd .conf:

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^mail\.(.*)
    RewriteRule ^.* http://www.%1:2095 [L]

    cPanel.net Support Ticket Number:
     
  3. goodmove

    goodmove Well-Known Member

    Joined:
    May 12, 2003
    Messages:
    624
    Likes Received:
    0
    Trophy Points:
    16
    Adding that to httpd.conf produced an error:

    Syntax error on line 2 of /usr/local/apache/conf/httpd.conf:
    Invalid command 'RewriteEngine', perhaps mis-spelled or defined by a module not included in the server configuration
    /usr/local/apache/bin/apachectl startssl: httpd could not be started.
     
  4. WMS

    WMS Active Member

    Joined:
    Jul 18, 2003
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Moscow
    Maybe, you do not have mod_rewrite module loaded with apache.

    cPanel.net Support Ticket Number:
     
  5. goodmove

    goodmove Well-Known Member

    Joined:
    May 12, 2003
    Messages:
    624
    Likes Received:
    0
    Trophy Points:
    16
    Yep, you are right! :(
     
  6. projectandrew

    projectandrew Well-Known Member

    Joined:
    Aug 27, 2003
    Messages:
    185
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    United Kingdom
    I've been playing with this in httpd.conf and found it only works if its put into the virtualhost section of a site, and also only if mail.domain.com is added to the serveralias field - it also works best for me if I use [L,R] instead of just [L].

    Question is, is there an easy way for this to apply to all virtual hosts without having to edit each one, or change a file somewhere so it will auto-add to each new domain. Also, can it be done without adding mail.domain.com to the serveralias field?

    Thanks!

    cPanel.net Support Ticket Number:
     
    #6 projectandrew, Sep 18, 2003
    Last edited: May 20, 2004
Loading...

Share This Page