How change the webmail url in Proxy subdomains

delalibera

Member
Jan 6, 2014
20
0
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.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,202
363
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.