转载来源:APACHE局域网配置域名访问 :https://www.cnblogs.com/jthb/p/3214229.html
1、打开APACHE的目录 \Apache2\conf\extra\httpd-vhosts.conf
2,在文件最后加入如下代码
<VirtualHost *:80>
DocumentRoot E:\projects\AD
ServerName www.ad.com
ServerAlias www.ad.com
3,打开hosts 文件
C:\Windows\System32\drivers\etc\hosts
配置以下域名
127.0.0.2 www.ad.com
参考链接:
APACHE局域网配置域名访问 :https://www.cnblogs.com/jthb/p/3214229.html