user3928459 user3928459 - 1 month ago 18
Apache Configuration Question

How do I block someone else's domain pointing to my Apache hosted website?

Hi I am running my website in Linux VPS with dedicated IP few weeks ago I found someone else domain is pointing to my website

Ex :: mydomain.com === server my site content
otherdomain.com === also server my site content


If I update or modify its getting updated on other domain too..

please need help any settings to prevent this

after searching many forums I found the name based virtual host
how to implement this in VPS Linux please guide me
or any other solution for this issue please help

I also try to see the reverse IP lookup my IP shows two domain
another 1 is bad domain is pointing my server/ IP but it server my site content ..how to stop this please help

Answer

If the domain is not yours there is no way to like.. not point it to your server, however you can point it to a serperate page by using VirtualHost's

Do this by doing the following, create a folder with a desired html / php file inside saying that the page is not existing or whatever

then edit your VirtualHosts file, let's say your using apache, that file would be in the following directory: /etc/apache2/sites-available/ open the file called default and add the following code:

<VirtualHost *:80>
DocumentRoot /www/example2
ServerName www.example.org
</VirtualHost>