当前位置:首页 > 域名报价 > 正文

ip反查域名命令

  题目是在说个什么意思呢,我们都知道

  打开网站有三种方式

  IP 端口 域名

  例如1.1.1.1 是百度的域名,我们可以www.baidu.com也可以https://1.1.1.1

  而这里要说的是域名方式的站点,如果我们购买的是VPS,默认就自己一个站点,域名和IP都可以打开,但是这样就算挂上CDN也会泄漏源站地址,所以这里我来仿一下加速乐的CDN节点。

  加速乐的页面比较简单,里面也就IP和时间的判断难点,中间的server随便写个就行了

  IP和时间我用的这里的接口,网页特效集锦

  <html>

  <head>

  <meta charset="utf-8" />

  <title>400 Unknown Virtual Host</title>

  <style>div{font-size:12px;}a{color:#1463da;text-decoration:none}a:hover{color:#1463da;text-decoration:underline;}</style>

  </head>

  <body bgcolor="white">

  <center><h1>400 Unknown Virtual Host</h1><div>&#22914;&#26524;&#24744;&#26159;&#32593;&#31449;&#30340;&#31649;&#29702;&#21592;&#65292;&#35831;<a href="https://bbs.jiasule.com/thread-11-1-1.html" target="_blank">&#28857;&#20987;&#36825;&#37324;</a>&#20102;&#35299;&#35814;&#24773;</div></center>

  <hr>

  <center>client:< src="https://code.helpor.net/mine/ip.php"></>, server: 072b5bc, time: < src="https://code.helpor.net/mine/date.php?style=1"></> < src="https://code.helpor.net/mine/time.php?style=1"></></center>

  <div style="display:none;"></div>

  </body>

  </html>

  文件命名为index.html

  那么放在哪里呢?这里就需要我们修改一下服务器的配置了

  开启虚拟主机配置

  在虚拟机的配置文件

  /etc/httpd/conf/httpd.conf

  中找到

  #NameVirtualHost *:80

  去掉注释

  NameVirtualHost *:80

  这样就开启了虚拟主机

  然后我们在配置的最后添加相应的虚拟主机目录

  IP对应一个目录,网站对应一个目录,然后相应的文件都移动过

  <VirtualHost *:80>

  ServerAdmin admin@tntsec.com

  DocumentRoot /var/www/html/root

  </VirtualHost>

  <VirtualHost *:80>

  ServerAdmin admin@tntsec.com

  DocumentRoot /var/www/html/tntsec

  ServerName qisiboke.xyz

  ServerAlias tntsec.com

  ErrorLog logs/tntsec.err.log

  CustomLog logs/tntsec.access.log common

  </VirtualHost>

  上面的index.html放到

  /var/www/html/root下面就可以了

  然后重启apache服务

  service httpd restart

  打开自己的IP看看效果吧

相关文章:

发表评论

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。