I have a mail server setup for a domain using postfix. For the ssl cert, I have created a virtual host for that mail server. The virtual host look like this
<VirtualHost *:80>
ServerName mail.domainX.net
DocumentRoot /var/www/roundcube/
ErrorLog ${APACHE_LOG_DIR}/mail.domainX.net_error.log
CustomLog ${APACHE_LOG_DIR}/mail.domainX.net_access.log combined
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /var/www/roundcube/>
Options FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
RewriteEngine on
RewriteCond %{SERVER_NAME} =mail.domainX.net
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
My problem is when I hit mail.domain.com in the browser it opens the webpage for another domain set up on my server using apache virtual host. How can I stop this from the browser?
Thanks in advance.