
October 24th, 2012, 05:12 AM
|
|
Registered User
|
|
Join Date: Oct 2012
Location: Stockholm, Sweden
Posts: 16
Time spent in forums: 6 h 27 m 22 sec
Reputation Power: 0
|
|
Quote: | Originally Posted by Ruski Hi All,
I would like to know if I can share a domain between 2 different hosts, one to manage email and the other to show the actual site.
If I just change the A record of the domain to point to the new IP address where the website sits, would the email sub domain still work with the current host?
Kind regards,
Alex |
Is this what you're looking for:
Webmail: webmail.domain.tld
Regular website: www.domain.tld
You want other users to be able to use webmail.domain.tld while e.g viewing their mail inbox or sending a mail?
Your user's mail addresses will work as following:
user@domain.tld
not as: webmail.domain.tld
The subdomain has nothing to do with the domain where people send mail to, after all, it's the mail server (Dovecot/Postfix) that decides the default host/domain to serve mail on.
To do this, follow my instructions:
1). Your DNS
[webmail.domain.tld] [86400] IN [A] [server ip]
2). Edit /etc/apache2/apache2.conf or /etc/httpd/conf/httpd.conf (path differs depending on your operating system)
Code:
NameVirtualHost xxx.xxx.xxx.xx:443
<VirtualHost xxx.xxx.xxx.xx:443>
ServerName webmail.domain.tld
DocumentRoot /var/webmail/
<Directory "/var/webmail/">
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
3). Restart apache (as sudoer), Note: apache2 is commonly used if you're on Ubuntu or Debian, httpd may be used if on RHEL or CentOS or similar.
Code:
service apache2 restart
service httpd restart
|