Redirect webmail.domain.com to webmail.domain.com:2096
I have read the related threads but no answer.
I cannot redirect http(s)://webmail.domain.com and http(s)://domain.com/webmail to
This is my configuration:
- Service subdomains
Add proxy VirtualHost to httpd.conf to automatically redirect unconfigured cpanel, webmail, webdisk, cpcalendars, cpcontacts, and whm subdomains to the correct port (requires mod_rewrite, mod_headers, and mod_proxy)
Off
- Redirection
Choose the closest matched domain for which that the system has a valid certificate when redirecting from non-SSL to SSL URLs. Formerly known as "Always redirect to SSL/TLS"
Off
- Non-SSL redirect destination
Origin Domain Name
- SSL redirect destination
SSL Certificate Name default
- Security
Require SSL for cPanel Services
On
Problem is some users believes it is domain.com/webmail, while others believes webmail.domain.com
I need to redirect all Webmail URL (http or httpS) to only one URL:2096,
Now I have http(s)://domain.com/webmail which redirects to https://domain.com:2096/. Although http(s)://webmail.domain.com do nothing.
What are the needed options?
-
Hey there! By default, I would expect both of those to work normally on the machine without any customization as those are built-in features of the cPanel tools. Do you have anything else set up that might be interfering with this behavior, such as customizations to Apache or tools like Cloudflare? 0 -
hi!. No, I dont' have cloudflare or apache personalizations. Server and CPanel install is new. I would be grateful for any help. Maybe some WHM option interfers? 0 -
Could you open a ticket with us so we can check this? That is one of those cPanel features that should just work normally, so it might be best for us to take a look at that for you. 0 -
ok, its partially solved. It works showing the CPanel to choose between :2093 or :443 Although my intention was to limit the access to Cpanel services (webmail, etc) by country. I try this inside WHM -> Apache -> includes (global pre-conf directive) although it doesn't work: RewriteCond %{HTTP_HOST} ^.*(autoconfig|autodiscover|cpanel|cpcalendars|cpcontacts|webdisk|webmail|whm).* [NC,OR] RewriteCond %{REQUEST_URI} ^.*(autoconfig|autodiscover|cpanel|cpcalendars|cpcontacts|webdisk|webmail|whm).* RewriteCond %{ENV:GEOIP_COUNTRY_CODE} !^(DE|CH|ES|IT|FR|)$ RewriteRule ^ 404 [END]
I have mod_geoip installed and working. Is there some way to include these conditions inside the Apache pre-directives?0
Please sign in to leave a comment.
Comments
4 comments