禁止默认虚拟主机:作用使除特定域名外,
其它的域名/ip无法访问此站点。
在虚拟主机配置文件中 即:/usr/local/apache2/conf/extra/httpd-vhosts.conf
将其中第一个虚拟主机改为如下:
<VirtualHost *:80>
DocumentRoot "/tmp/www"
ServerName www.ee.com
</VirtualHost>

创建空目录 mkdir /tmp/www
为目录更改权限:chmod 600 /tmp/www
<Directory /tmp/www>
Order allow,deny
Deny from all
</Directory>

相关文章:

  • 2021-09-24
  • 2021-12-27
  • 2021-08-16
  • 2022-12-23
  • 2021-12-08
  • 2022-12-23
猜你喜欢
  • 2021-10-12
  • 2021-06-22
  • 2021-07-18
  • 2021-08-02
  • 2022-12-23
  • 2021-12-26
相关资源
相似解决方案