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.

How change the webmail url in Proxy subdomains

Discussion in 'E-mail Discussions' started by delalibera, Jan 6, 2014.

  1. delalibera

    delalibera Member

    Joined:
    Jan 6, 2014
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Reseller Owner
    I would like to change the webmail url automatically generated in the config proxy subdomains in WHM.

    The generated code in httpd.conf is this for the proxy subdomains:
    RewriteCond %{HTTP_HOST} ^webmail\.
    RewriteRule ^/(.*) http://127.0.0.1:2095/$1 [P]

    Would you like to switch to this:
    RewriteCond %{HTTP_HOST} ^webmail\.
    RewriteRule ^/(.*) http://soft.domain.com/$1 [P]

    The soft.domain.com is an account with a webmail software.

    This code is automatically generated and I can not change by editing httpd.conf.

    Can someone help me?

    Thank you.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    These entries are stored in the following file:

    Code:
    /var/cpanel/templates/apache2/main.default
    You will need to copy this file to the following name:

    Code:
    /var/cpanel/templates/apache2/main.local
    Note that the "apache2" part of the path may change, depending on the version of Apache installed on your system. Next, edit the newly copied local file to the modified values of your preference, save the file, and run the following commands:

    Code:
    /usr/local/cpanel/bin/apache_conf_distiller --update
    /usr/local/cpanel/bin/build_apache_conf
    /scripts/restartsrv_httpd
    
    Thank you.
     
  3. delalibera

    delalibera Member

    Joined:
    Jan 6, 2014
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Reseller Owner
    It worked perfectly!

    Thank you for your help!
     
  4. ServeXia

    ServeXia Registered

    Joined:
    Oct 30, 2015
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    France
    cPanel Access Level:
    Website Owner
    Just to say thanks Michael!
     
    #4 ServeXia, Oct 30, 2015
    Last edited by a moderator: Oct 30, 2015
Loading...

Share This Page