Skip to main content

Change default subdomain for webmail to mail

Comments

5 comments

  • cPanelMichael
    Hello :) These entries are stored in the following file:
    /var/cpanel/templates/apache2/main.default
    You will need to copy this file to the following name:
    /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:
    /usr/local/cpanel/bin/apache_conf_distiller --update /usr/local/cpanel/bin/build_apache_conf /scripts/restartsrv_httpd
    Thank you.
    0
  • Scottnl
    Thanks Michael for your answer. I copied the file to main.local. There are a few places that you can replace webmail. Do you replace all of them or just the ones in the RewriteCond? I'm pretty new to Cpanel and don't want to make mistakes. Scott
    0
  • cPanelMichael
    Yes, you must update the Rewrite rules and the ServerAliases entries to the updated names of your choosing. Thank you.
    0
  • Scottnl
    I replaced webmail to mail and cpanel to server. I also ran these scripts
    /usr/local/cpanel/bin/apache_conf_distiller --update /usr/local/cpanel/bin/build_apache_conf /scripts/restartsrv_httpd
    I am still redirected to default webpage. Am i missing something?
    0
  • cPanelMichael
    It's likely you did not correctly edit the /var/cpanel/templates/apache2/main.local file. Could you provide an example of the changes you made? Thank you.
    0

Please sign in to leave a comment.