今天为了做项目,在Apache中配置了项目域名,成功访问.但是忽然发现要访问localhost突然出现The requested URL / was not found on this server. 出现这种情况在网上查了下是由于开启 httpd.conf 文件中 Include conf/extra/httpd-vhosts.conf 导致的,只要把它注释掉就可以了,我试了一下确实可以,但是我的虚拟域名还得要啊. 于是就想给 localhost 配置虚拟域名,但是配完之后也没有出现预期的效果
关于Apache配置虚拟主机后在局域网中让其他电脑访问 #test1# NameVirtualHost *:80 ServerName www.t1.com DocumentRoot "/Users/me/www/test1" Options Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all #test2# Name