From a9a0b2fa5220a9dac0f479b083181b1820d90277 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tup=C3=A3=20Negreiros?= Date: Fri, 14 Oct 2016 13:59:18 -0300 Subject: [PATCH] website and webmail in different servers I understand that using example.com/mail for webmail implies that example.com must be in same server. This is not the case if website is in S3/CloudFront/LoadBalancing or another EC2 instance. So I suggest using webmail.example.com for HTTP/HTTPS webmail access. You will need to update Route 53 settings in tutorial. --- apache.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/apache.sh b/apache.sh index a744ded..ac9bc5f 100755 --- a/apache.sh +++ b/apache.sh @@ -44,8 +44,8 @@ echo "$start_tag AllowOverride All DocumentRoot /var/www/vhosts/$mydomain/httpdocs - ServerName $mydomain - Redirect permanent /mail https://$mydomain/mail + ServerName webmail.$mydomain + Redirect permanent / https://webmail.$mydomain NameVirtualHost *:443 @@ -58,9 +58,8 @@ NameVirtualHost *:443 AllowOverride All - DocumentRoot /var/www/vhosts/$mydomain/httpsdocs - ServerName $mydomain - Alias /mail /usr/local/squirrelmail/www + ServerName webmail.$mydomain + DocumentRoot /usr/local/squirrelmail/www Options None