October 24th, 2012, 05:12 AM
Join Date: Oct 2012
Location: Stockholm, Sweden
Time spent in forums: 6 h 27 m 22 sec
Reputation Power: 0
Originally Posted by Ruski
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?
Is this what you're looking for:
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:
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]  IN [A] [server ip]
2). Edit /etc/apache2/apache2.conf or /etc/httpd/conf/httpd.conf (path differs depending on your operating system)
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.
Allow from all
service apache2 restart
service httpd restart