如何阻止其他人的域名指向我的Apache托管网站? [英] How do I block someone else's domain pointing to my Apache hosted website?
问题描述
我几周前在具有专用IP的Linux VPS上运行我的网站,我发现其他人指向我的网站
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
在搜索许多论坛后,我发现了基于名称的虚拟主机如何在VPS Linux中实现此功能,请指导我或任何其他解决此问题的方法,请帮助
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
我还尝试查看反向IP查找,我的IP显示了两个域另外1个错误的域名指向我的服务器/IP,但它服务器了我的网站内容.
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
推荐答案
如果该域不是您的域,则没有办法喜欢..不能将其指向您的服务器,但是您可以使用VirtualHost的将其指向一个分页
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
执行以下操作,创建一个文件夹,其中包含所需的html/php文件,指出该页面不存在或任何其他内容
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
然后编辑您的VirtualHosts文件,假设您使用的是apache,该文件将位于以下目录中:/etc/apache2/sites-available/
打开名为 default
的文件,并添加以下代码:
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>
这篇关于如何阻止其他人的域名指向我的Apache托管网站?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!