我已经在Debian拉伸系统上安装了Apache。我没有启用任何站点,但是由于某种原因,如果我转到/var/www/html/index.html,http://hostname仍然呈现。
加载站点:
root@hostname:/etc/apache2# a2query -s
No site matches (disabled by site administrator)访问日志将转到/var/log/apache2/other_vhosts_access.log,它在/etc/apache2/conf-enabled/other-vhosts-access-log.conf -> ../conf-available/other-vhosts-access-log.conf中设置:
root@hostname:/etc/apache2/conf-enabled# more other-vhosts-access-log.conf
# Define an access log for VirtualHosts that don't define their own logfile
CustomLog ${APACHE_LOG_DIR}/other_vhosts_access.log vhost_combined
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet我怎样才能找到这样做的背景?我希望禁用该VirtualHost,因此目前没有加载/呈现页面。
发布于 2017-07-23 07:13:37
配置Apache时存在默认虚拟主机。您可以通过创建一个具有要禁用的域名的虚拟主机来禁用它。在配置中,您可以告诉Apache向每个请求返回404。
https://serverfault.com/questions/864673
复制相似问题