I have ubuntu server with apache 2.4 web server and original domain is running with ssl. Someone pointed their domain to my server and in my virtual host, it specify there the servername and serveralias so it should accept only connection from original domain, below is the virtual host
<IfModule mod_ssl.c>
<VirtualHost *:443>
DocumentRoot /var/www/interoptive.com
ServerName interoptive.com
ServerAlias interoptive.com
<Directory /var/www/interoptive.com>
AllowOverride All
allow from all
Options -Indexes
</Directory>
ErrorLog /var/www/interoptive.com/apache.error.log
CustomLog /var/www/interoptive.com/apache.access.log common
php_flag log_errors on
php_flag display_errors off
php_value error_reporting 2147483647
php_value error_log /var/www/interoptive.com/php.error.log
Include /etc/letsencrypt/options-ssl-apache.conf
ServerAlias interoptive.com
SSLCertificateFile /etc/letsencrypt/live/interoptive.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/interoptive.com/privkey.pem
RewriteEngine on
RewriteCond %{SERVER_NAME} =interoptive.com
</VirtualHost>
</IfModule>
The original domain is interoptive.com and the other domain is ecomprime.com. How to configure the apache to accept only connections from the original domain and drop all connections from other domain?
Tried sources from internet but none seems to work. Help, suggestions, recommendations is greatly appreciated. Thanks in advance.