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!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

SOLVED Website in one server, mail in another

Discussion in 'E-mail Discussions' started by acpro, Mar 17, 2017.

  1. acpro

    acpro Member

    Joined:
    Mar 7, 2017
    Messages:
    11
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    Portugal
    cPanel Access Level:
    Root Administrator
    Hi.

    I recently changed the website to one server, keeping the mail in the old server, so:

    domain.com A IPNewServer
    domain.com MX mail.domain.com
    mail A IPOldServer
    -----------------------------

    webmail.domain.com -> OK
    mail.domain.com -> OK
    domain.com/webmail -> Redirects to domain.com:2096 on new server.

    -----------------------------

    So how can i redirect domain.com/webmail redirecting to old server email?

    Thanks.

    Best Regards.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,427
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
  3. acpro

    acpro Member

    Joined:
    Mar 7, 2017
    Messages:
    11
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    Portugal
    cPanel Access Level:
    Root Administrator
    Hi.

    Thanks for pointing out.. i also find this useful:
    tecadmin.net/add-custom-settings-in-whm-cpanel-apache-virtualhost/

    Ended up doing this:
    -For Apache 2.4, check Apache version and change 2_4 to Apache version
    -Non SSL
    Code:
    mkdir -p /etc/apache2/conf.d/userdata/std/2_4/domain/domain.com/
    cd /etc/apache2/conf.d/userdata/std/2_4/domain/domain.com/
    
    nano extra.conf
    
    ScriptAlias /webmail /home/domain/public_html/email/
    ScriptAliasMatch ^/webmail/(.*) /home/domain/public_html/email/
    
    /scripts/rebuildhttpdconf
    service httpd restart
    
     
    cPanelMichael likes this.
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,427
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello @acpro,

    I'm happy to see you were able to find a solution. Thank you for updating this thread with the outcome.
     
Loading...

Share This Page